Ejemplo n.º 1
0
  @Override
  public synchronized Sequence clone() {
    Sequence clone = new Sequence(wrapAround);
    clone.identity = identity;
    clone.currentValue.set(currentValue.get());
    clone.lastValue.set(lastValue.get());

    return clone;
  }
Ejemplo n.º 2
0
 public void assertSameParent(Sequence sequence) throws SequenceException {
   if (!identity.toString().equals(sequence.identity.toString())) {
     throw new SequenceException(
         "Parents differ, this=" + identity + ", sequence=" + sequence.getIdentity());
   }
 }