@Test public final void testEqualsObject() { try { final GUIDImpl parsed1 = new GUIDImpl(properties.getProperty(FIELDS.BASE32.name())); final GUIDImpl parsed2 = new GUIDImpl(properties.getProperty(FIELDS.BASE64.name())); final GUIDImpl parsed3 = new GUIDImpl(properties.getProperty(FIELDS.BASE16.name())); final GUIDImpl parsed4 = new GUIDImpl(properties.getProperty(FIELDS.BASEARK.name())); final byte[] bytes = StringUtils.getBytesFromArraysToString( properties.getProperty(FIELDS.BYTES.name())); final GUIDImpl parsed5 = new GUIDImpl(bytes); assertTrue(parsed1.equals(parsed2)); assertTrue(parsed1.equals(parsed3)); assertTrue(parsed1.equals(parsed4)); assertTrue(parsed1.equals(parsed5)); assertEquals(properties.getProperty(FIELDS.BASE32.name()), parsed1.toString()); assertEquals(properties.getProperty(FIELDS.BASE32.name()), parsed1.getId()); assertEquals(properties.getProperty(FIELDS.BASE32.name()), parsed1.toBase32()); assertEquals(properties.getProperty(FIELDS.BASE64.name()), parsed1.toBase64()); assertEquals(properties.getProperty(FIELDS.BASE16.name()), parsed1.toHex()); assertEquals(properties.getProperty(FIELDS.BASEARK.name()), parsed1.toArk()); assertEquals(properties.getProperty(FIELDS.ARKNAME.name()), parsed1.toArkName()); } catch (final InvalidGuidOperationException e) { LOGGER.debug(e); fail(e.getMessage()); } }
@Override @JsonIgnore public final String toArkName() { final byte[] temp = new byte[KEYSIZE - TENANT_SIZE]; System.arraycopy(guid, HEADER_POS, temp, 0, HEADER_SIZE); System.arraycopy(guid, PLATFORM_POS, temp, HEADER_SIZE, PLATFORM_SIZE + PID_SIZE + TIME_SIZE + COUNTER_SIZE); return BaseXx.getBase32(temp); }
GUIDImpl extends GUIDAbstract { @Override @JsonIgnore public final String toArkName() { final byte[] temp = new byte[KEYSIZE - TENANT_SIZE]; System.arraycopy(guid, HEADER_POS, temp, 0, HEADER_SIZE); System.arraycopy(guid, PLATFORM_POS, temp, HEADER_SIZE, PLATFORM_SIZE + PID_SIZE + TIME_SIZE + COUNTER_SIZE); return BaseXx.getBase32(temp); } }
GUIDImpl extends GUIDAbstract { @Override @JsonIgnore public final String toArkName() { final byte[] temp = new byte[KEYSIZE - TENANT_SIZE]; System.arraycopy(guid, HEADER_POS, temp, 0, HEADER_SIZE); System.arraycopy(guid, PLATFORM_POS, temp, HEADER_SIZE, PLATFORM_SIZE + PID_SIZE + TIME_SIZE + COUNTER_SIZE); return BaseXx.getBase32(temp); } GUIDImpl();   GUIDImpl(final byte[] bytes);   GUIDImpl(final String idsource); }
GUIDImpl extends GUIDAbstract { @Override @JsonIgnore public final String toArkName() { final byte[] temp = new byte[KEYSIZE - TENANT_SIZE]; System.arraycopy(guid, HEADER_POS, temp, 0, HEADER_SIZE); System.arraycopy(guid, PLATFORM_POS, temp, HEADER_SIZE, PLATFORM_SIZE + PID_SIZE + TIME_SIZE + COUNTER_SIZE); return BaseXx.getBase32(temp); } GUIDImpl();   GUIDImpl(final byte[] bytes);   GUIDImpl(final String idsource); static int getKeySize(); @Override @JsonIgnore final int getVersion(); @Override @JsonIgnore final int getObjectId(); @Override @JsonIgnore final int getTenantId(); @Override @JsonIgnore final boolean isWorm(); @Override @JsonIgnore final int getPlatformId(); @Override @JsonIgnore final byte[] getMacFragment(); @Override @JsonIgnore final int getProcessId(); @Override @JsonIgnore final long getTimestamp(); @Override @JsonIgnore final int getCounter(); @Override @JsonIgnore final String toArkName(); @Override int compareTo(final GUID arg1); }
GUIDImpl extends GUIDAbstract { @Override @JsonIgnore public final String toArkName() { final byte[] temp = new byte[KEYSIZE - TENANT_SIZE]; System.arraycopy(guid, HEADER_POS, temp, 0, HEADER_SIZE); System.arraycopy(guid, PLATFORM_POS, temp, HEADER_SIZE, PLATFORM_SIZE + PID_SIZE + TIME_SIZE + COUNTER_SIZE); return BaseXx.getBase32(temp); } GUIDImpl();   GUIDImpl(final byte[] bytes);   GUIDImpl(final String idsource); static int getKeySize(); @Override @JsonIgnore final int getVersion(); @Override @JsonIgnore final int getObjectId(); @Override @JsonIgnore final int getTenantId(); @Override @JsonIgnore final boolean isWorm(); @Override @JsonIgnore final int getPlatformId(); @Override @JsonIgnore final byte[] getMacFragment(); @Override @JsonIgnore final int getProcessId(); @Override @JsonIgnore final long getTimestamp(); @Override @JsonIgnore final int getCounter(); @Override @JsonIgnore final String toArkName(); @Override int compareTo(final GUID arg1);  }