@Override
  public Iterator<T> iterator() {
    return new Iterator<T>() {
      private int returned = 0;

      @Override
      public boolean hasNext() {
        return this.returned < 2;
      }

      @Override
      public T next() {
        if (++this.returned == 1) return getFirst();
        else if (this.returned == 2) return getSecond();
        else throw new IllegalAccessError("this.returned=" + this.returned);
      }

      @Override
      public void remove() {
        throw new NotImplementedException(HConstants.NOT_IMPLEMENTED);
      }
    };
  }
Return the second element stored in the pair.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/PairOfSameType.java