本文整理了Java中org.uberfire.commons.uuid.UUID.uuid()
方法的一些代码示例,展示了UUID.uuid()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UUID.uuid()
方法的具体详情如下:
包路径:org.uberfire.commons.uuid.UUID
类名称:UUID
方法名:uuid
[英]Generate a RFC4122, version 4 ID. Example: "92329D39-6F5C-4520-ABFC-AAB64544E172"
[中]生成RFC4122版本4 ID。示例:“92329D39-6F5C-4520-ABFC-AAB64544E172”
代码示例来源: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.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
@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-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");
}
代码示例来源:origin: kiegroup/appformer
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: org.uberfire/uberfire-wires-core-client
public DefaultControlPoint(final double x,
final double y,
final ControlPointMoveHandler cpMoveHandler) {
super(RADIUS);
this.id = UUID.uuid();
this.cpMoveHandler = cpMoveHandler;
setFillColor(ShapesUtils.CP_RGB_FILL_COLOR);
setStrokeWidth(ShapesUtils.CP_RGB_STROKE_WIDTH_SHAPE);
setX(x);
setY(y);
setDraggable(true);
setupHandlers(cpMoveHandler);
}
代码示例来源:origin: kiegroup/appformer
public DefaultControlPoint(final double x,
final double y,
final ControlPointMoveHandler cpMoveHandler) {
super(RADIUS);
this.id = UUID.uuid();
this.cpMoveHandler = cpMoveHandler;
setFillColor(ShapesUtils.CP_RGB_FILL_COLOR);
setStrokeWidth(ShapesUtils.CP_RGB_STROKE_WIDTH_SHAPE);
setX(x);
setY(y);
setDraggable(true);
setupHandlers(cpMoveHandler);
}
代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client
private VerifierWebWorkerConnectionImpl getWebWorker() {
if (webWorker == null) {
webWorker = new VerifierWebWorkerConnectionImpl(new DrlInitialize(UUID.uuid(),
model,
new ModelMetaDataEnhancer(model).getHeaderMetaData(),
fieldTypeProducer.getFactTypes(),
ApplicationPreferences.getDroolsDateFormat()),
"verifier/dtableVerifier/dtableVerifier.nocache.js",
getPoster(),
new Receiver(getAnalysisReporter()));
}
return webWorker;
}
内容来源于网络,如有侵权,请联系作者删除!