@Test public void testSequenceCollCreation_1() { MongoSequence s = new MongoSequence(getDataSource().getMongoInstance(), db, coll, key); MongoSequence s1 = new MongoSequence(getDataSource().getMongoInstance(), db, coll, key); Assert.assertEquals("A", s.getNext()); Assert.assertEquals("B", s1.getNext()); Assert.assertEquals("C", s.getNext()); Assert.assertEquals("D", s1.getNext()); }
public String getNext() { String v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); char c = v.charAt(0); while ( c >= '0' && c <= '9') { v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); c = v.charAt(0); } return v; }
MongoSequence implements ISequence { public String getNext() { String v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); char c = v.charAt(0); while ( c >= '0' && c <= '9') { v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); c = v.charAt(0); } return v; } }
MongoSequence implements ISequence { public String getNext() { String v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); char c = v.charAt(0); while ( c >= '0' && c <= '9') { v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); c = v.charAt(0); } return v; } MongoSequence(Mongo mongo, String dbName, String collName, String key); }
MongoSequence implements ISequence { public String getNext() { String v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); char c = v.charAt(0); while ( c >= '0' && c <= '9') { v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); c = v.charAt(0); } return v; } MongoSequence(Mongo mongo, String dbName, String collName, String key); String getNext(); }
MongoSequence implements ISequence { public String getNext() { String v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); char c = v.charAt(0); while ( c >= '0' && c <= '9') { v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); c = v.charAt(0); } return v; } MongoSequence(Mongo mongo, String dbName, String collName, String key); String getNext();  }