本文整理了Java中org.uberfire.commons.uuid.UUID
类的一些代码示例,展示了UUID
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UUID
类的具体详情如下:
包路径:org.uberfire.commons.uuid.UUID
类名称:UUID
[英]Can be used to make UUID Strings.
[中]可用于生成UUID字符串。
代码示例来源:origin: org.uberfire/uberfire-commons
/**
* Generate a random uuid of the specified length. Example: uuid(15) returns
* "VcydxgltxrVZSTV"
* @param len the desired number of characters
*/
public static String uuid(int len) {
return uuid(len,
CHARS.length);
}
代码示例来源:origin: org.drools/drools-wb-verifier-guided-decision-table-adapter
@Override
protected String newUUID() {
return UUID.uuid();
}
},
代码示例来源:origin: kiegroup/appformer
/**
* Generate a random uuid of the specified length. Example: uuid(15) returns
* "VcydxgltxrVZSTV"
* @param len the desired number of characters
*/
public static String uuid(int len) {
return uuid(len,
CHARS.length);
}
代码示例来源:origin: kiegroup/drools-wb
@Override
protected String newUUID() {
return UUID.uuid();
}
},
代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client
private void setupParentId() {
parentId = UUID.uuid();
view.setParentId(parentId);
}
代码示例来源:origin: kiegroup/drools-wb
private void setupParentId() {
parentId = UUID.uuid();
view.setParentId(parentId);
}
代码示例来源:origin: org.kie.workbench/kie-wb-common-dmn-client
DataTypeManager withUUID() {
dataType.setUUID(UUID.uuid());
return this;
}
代码示例来源:origin: org.jbpm/jbpm-wb-data-filters-client
protected String getNewFilterSettingsKey() {
return getGridGlobalPreferencesKey() + "_" + UUID.uuid();
}
代码示例来源:origin: kiegroup/jbpm-wb
protected String getNewFilterSettingsKey() {
return getGridGlobalPreferencesKey() + "_" + UUID.uuid();
}
代码示例来源:origin: org.uberfire/uberfire-commons
@Test(expected = IllegalArgumentException.class)
public void tooLongRadix() throws
Exception {
UUID.uuid(10,
63);
}
代码示例来源:origin: kiegroup/appformer
@Test(expected = IllegalArgumentException.class)
public void tooLongRadix() throws
Exception {
UUID.uuid(10,
63);
}
代码示例来源:origin: org.uberfire/uberfire-commons
@Test
public void generateWithGivenLength() throws
Exception {
assertEquals(12,
UUID.uuid(12)
.length());
assertEquals(6,
UUID.uuid(6)
.length());
assertEquals(100,
UUID.uuid(100)
.length());
}
代码示例来源:origin: kiegroup/appformer
public WiresBaseShape() {
id = UUID.uuid();
setDraggable(true);
//Clicking the Group selects the Shape
addNodeMouseClickHandler(new NodeMouseClickHandler() {
@Override
public void onNodeMouseClick(final NodeMouseClickEvent nodeMouseClickEvent) {
selectionManager.selectShape(WiresBaseShape.this);
}
});
//Update Control positions when Shape is dragged
addNodeDragMoveHandler(new NodeDragMoveHandler() {
@Override
public void onNodeDragMove(final NodeDragMoveEvent nodeDragMoveEvent) {
updateControlLocations();
}
});
}
代码示例来源:origin: kiegroup/appformer
@Test
public void generateWithGivenLength() throws
Exception {
assertEquals(12,
UUID.uuid(12)
.length());
assertEquals(6,
UUID.uuid(6)
.length());
assertEquals(100,
UUID.uuid(100)
.length());
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-api
public WiresBaseShape() {
id = UUID.uuid();
setDraggable(true);
//Clicking the Group selects the Shape
addNodeMouseClickHandler(new NodeMouseClickHandler() {
@Override
public void onNodeMouseClick(final NodeMouseClickEvent nodeMouseClickEvent) {
selectionManager.selectShape(WiresBaseShape.this);
}
});
//Update Control positions when Shape is dragged
addNodeDragMoveHandler(new NodeDragMoveHandler() {
@Override
public void onNodeDragMove(final NodeDragMoveEvent nodeDragMoveEvent) {
updateControlLocations();
}
});
}
代码示例来源:origin: org.uberfire/uberfire-commons
@Test
public void hasFiveGroups() throws
Exception {
final String uuid = UUID.uuid();
final String[] split = uuid.split("-");
assertEquals(5,
split.length);
}
代码示例来源:origin: kiegroup/appformer
@Test
public void hasFiveGroups() throws
Exception {
final String uuid = UUID.uuid();
final String[] split = uuid.split("-");
assertEquals(5,
split.length);
}
代码示例来源:origin: org.uberfire/uberfire-commons
@Test
public void generateWithGivenLengthAndRadix() throws
Exception {
assertOnlyContainsCharacters(UUID.uuid(10,
2),
"0",
"1");
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-client
public DefaultMagnet(final double x,
final double y) {
super(RADIUS);
this.id = UUID.uuid();
setFillColor(ShapesUtils.MAGNET_RGB_FILL_SHAPE);
setStrokeWidth(ShapesUtils.CP_RGB_STROKE_WIDTH_SHAPE);
setX(x);
setY(y);
setDraggable(false);
}
代码示例来源:origin: kiegroup/appformer
@Test
public void generateWithGivenLengthAndRadix() throws
Exception {
assertOnlyContainsCharacters(UUID.uuid(10,
2),
"0",
"1");
}
内容来源于网络,如有侵权,请联系作者删除!