@Test public void testNextLabel1() throws Exception { LabelsSource generator = new LabelsSource("SENTENCE_"); assertEquals("SENTENCE_0", generator.nextLabel()); }
public synchronized String nextLabel() { if (labels != null) { return labels.get(((Long) counter.getAndIncrement()).intValue()); } else { maxCount = counter.getAndIncrement(); return formatLabel(maxCount); } }
LabelsSource implements Serializable { public synchronized String nextLabel() { if (labels != null) { return labels.get(((Long) counter.getAndIncrement()).intValue()); } else { maxCount = counter.getAndIncrement(); return formatLabel(maxCount); } } }
LabelsSource implements Serializable { public synchronized String nextLabel() { if (labels != null) { return labels.get(((Long) counter.getAndIncrement()).intValue()); } else { maxCount = counter.getAndIncrement(); return formatLabel(maxCount); } } LabelsSource();  LabelsSource(@NonNull String template);  LabelsSource(@NonNull List<String> labels); }
LabelsSource implements Serializable { public synchronized String nextLabel() { if (labels != null) { return labels.get(((Long) counter.getAndIncrement()).intValue()); } else { maxCount = counter.getAndIncrement(); return formatLabel(maxCount); } } LabelsSource();  LabelsSource(@NonNull String template);  LabelsSource(@NonNull List<String> labels); int indexOf(String label); int size(); synchronized String nextLabel(); List<String> getLabels(); void storeLabel(String label); void reset(); int getNumberOfLabelsUsed(); }
LabelsSource implements Serializable { public synchronized String nextLabel() { if (labels != null) { return labels.get(((Long) counter.getAndIncrement()).intValue()); } else { maxCount = counter.getAndIncrement(); return formatLabel(maxCount); } } LabelsSource();  LabelsSource(@NonNull String template);  LabelsSource(@NonNull List<String> labels); int indexOf(String label); int size(); synchronized String nextLabel(); List<String> getLabels(); void storeLabel(String label); void reset(); int getNumberOfLabelsUsed();  }