@Test public void testSeparator() throws Exception { SimpleIdGenerator guid = new SimpleIdGenerator("-"); assertEquals("-", guid.getSeparator()); assertNotNull(guid.create(guid)); assertTrue(guid.create(guid).contains("-")); }
@Override public String create(Object msg) { return host + getSeparator() + (msg == null ? "0" : Integer.toHexString(msg.hashCode())) + getSeparator() + System.currentTimeMillis(); }
SimpleIdGenerator extends PlainIdGenerator { @Override public String create(Object msg) { return host + getSeparator() + (msg == null ? "0" : Integer.toHexString(msg.hashCode())) + getSeparator() + System.currentTimeMillis(); } }
SimpleIdGenerator extends PlainIdGenerator { @Override public String create(Object msg) { return host + getSeparator() + (msg == null ? "0" : Integer.toHexString(msg.hashCode())) + getSeparator() + System.currentTimeMillis(); } SimpleIdGenerator();  SimpleIdGenerator(String separator); }
SimpleIdGenerator extends PlainIdGenerator { @Override public String create(Object msg) { return host + getSeparator() + (msg == null ? "0" : Integer.toHexString(msg.hashCode())) + getSeparator() + System.currentTimeMillis(); } SimpleIdGenerator();  SimpleIdGenerator(String separator); @Override String create(Object msg); }
SimpleIdGenerator extends PlainIdGenerator { @Override public String create(Object msg) { return host + getSeparator() + (msg == null ? "0" : Integer.toHexString(msg.hashCode())) + getSeparator() + System.currentTimeMillis(); } SimpleIdGenerator();  SimpleIdGenerator(String separator); @Override String create(Object msg);  }