@Test public void toStringTest() { Blueprint blueprint = new Blueprint(System.currentTimeMillis(), 0, 0, 0); assertThat(blueprint.toString(), is(notNullValue())); assertThat(blueprint.toString().length(), is(not(0))); }
@Override public String toString() { return String.format( "{\n timestamp: %d,\n sequence: %d,\n generator: %d,\n cluster: %d\n}", timestamp, sequence, generatorId, clusterId); }
Blueprint { @Override public String toString() { return String.format( "{\n timestamp: %d,\n sequence: %d,\n generator: %d,\n cluster: %d\n}", timestamp, sequence, generatorId, clusterId); } }
Blueprint { @Override public String toString() { return String.format( "{\n timestamp: %d,\n sequence: %d,\n generator: %d,\n cluster: %d\n}", timestamp, sequence, generatorId, clusterId); } Blueprint(long timestamp, int sequence, int generatorId, int clusterId); }
Blueprint { @Override public String toString() { return String.format( "{\n timestamp: %d,\n sequence: %d,\n generator: %d,\n cluster: %d\n}", timestamp, sequence, generatorId, clusterId); } Blueprint(long timestamp, int sequence, int generatorId, int clusterId); long getTimestamp(); int getSequence(); int getGeneratorId(); int getClusterId(); @Override String toString(); }
Blueprint { @Override public String toString() { return String.format( "{\n timestamp: %d,\n sequence: %d,\n generator: %d,\n cluster: %d\n}", timestamp, sequence, generatorId, clusterId); } Blueprint(long timestamp, int sequence, int generatorId, int clusterId); long getTimestamp(); int getSequence(); int getGeneratorId(); int getClusterId(); @Override String toString(); final static long MAX_TIMESTAMP; final static int MAX_SEQUENCE_COUNTER; final static int MAX_GENERATOR_ID; final static int MAX_CLUSTER_ID; }