@Override public ID createInstance(Object[] parameters) throws IDCreateException { try { String init = getInitStringFromExternalForm(parameters); if (init != null) return new UuID(this, UUID.fromString(init)); if (parameters != null && parameters.length > 0) { if (parameters[0] instanceof String) return new UuID(this, UUID.fromString((String) parameters[0])); else if (parameters[0] instanceof URI) return new UuID(this, UUID.fromString(((URI) parameters[0]) .getSchemeSpecificPart())); else if (parameters[0] instanceof UUID) return new UuID(this, (UUID) parameters[0]); } // If we get here, then use random return new UuID(this, UUID.randomUUID()); } catch (Exception e) { throw new IDCreateException(UuIDNamespace.this.getName() + " createInstance()", e); //$NON-NLS-1$ } }
@Override public ID createInstance(Object[] parameters) throws IDCreateException { try { String init = getInitStringFromExternalForm(parameters); if (init != null) return new UuID(this, UUID.fromString(init)); if (parameters != null && parameters.length > 0) { if (parameters[0] instanceof String) return new UuID(this, UUID.fromString((String) parameters[0])); else if (parameters[0] instanceof URI) return new UuID(this, UUID.fromString(((URI) parameters[0]) .getSchemeSpecificPart())); else if (parameters[0] instanceof UUID) return new UuID(this, (UUID) parameters[0]); } // If we get here, then use random return new UuID(this, UUID.randomUUID()); } catch (Exception e) { throw new IDCreateException(UuIDNamespace.this.getName() + " createInstance()", e); //$NON-NLS-1$ } }
/** * @since 3.5 */ public ID createUuID(URI uuidURI) throws IDCreateException { return createID(new UuID.UuIDNamespace(), new Object[] { uuidURI }); }
/** * @since 3.5 */ public ID createUuID(UUID uuid) throws IDCreateException { return createID(new UuID.UuIDNamespace(), new Object[] { uuid }); }
/** * @since 3.5 */ public ID createUuID(String uuid) throws IDCreateException { return createID(new UuID.UuIDNamespace(), new Object[] { uuid }); }
/** * @since 3.5 */ public ID createUuID(UUID uuid) throws IDCreateException { return createID(new UuID.UuIDNamespace(), new Object[] { uuid }); }
/** * @since 3.5 */ public ID createUuID(String uuid) throws IDCreateException { return createID(new UuID.UuIDNamespace(), new Object[] { uuid }); }
/** * @since 3.5 */ public ID createUuID() throws IDCreateException { return createID(new UuID.UuIDNamespace(), (Object[]) null); } }
/** * @since 3.5 */ public ID createUuID() throws IDCreateException { return createID(new UuID.UuIDNamespace(), (Object[]) null); } }
/** * @since 3.5 */ public ID createUuID(URI uuidURI) throws IDCreateException { return createID(new UuID.UuIDNamespace(), new Object[] { uuidURI }); }