@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;
  }
 public void assertSameParent(Sequence sequence) throws SequenceException {
   if (!identity.toString().equals(sequence.identity.toString())) {
     throw new SequenceException(
         "Parents differ, this=" + identity + ", sequence=" + sequence.getIdentity());
   }
 }