public int clockSequence() {
    if (version() != 1) {
      throw new UnsupportedOperationException("Not a time-based UUID");
    }
    if (sequence < 0) {
      sequence = (int)((leastSigBits & 0x3FFF000000000000L) >>> 48);
    }
    return sequence;
  }