code: public int compareTo(final OCompositeKey otherKey) {
      final Iterator<Object> inIter = keys.iterator();
      final Iterator<Object> outIter = otherKey.keys.iterator();
  
      while (inIter.hasNext() && outIter.hasNext()) {
        final Object inKey = inIter.next();
        final Object outKey = outIter.next();
  
        if (outKey instanceof OAlwaysGreaterKey)
          return -1;
  
        if (outKey instanceof OAlwaysLessKey)
          return 1;
  
        final int result = comparator.compare(inKey, outKey);
        if (result != 0)
          return result;
      }
  
      return 0;
    }
docs: Performs partial comparison of two composite keys.
  
  Two objects will be equal if the common subset of their keys is equal. For example if first object contains two keys and second
  contains four keys then only first two keys will be compared.
  
  @param otherKey
  Key to compare.
  
  @return a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified
  object.