Class HashableTuple

  • All Implemented Interfaces:

    public abstract class HashableTuple
    extends Object
    implements KeyValue
    HashableTuple is a wrapper for Tuples from a single Query so they can be stored in a HashSet. If the two wrapped Tuples have the same values for the Query's key fields, then the HashableTuples will have the same hashCode and will return true from .equals()
    • Field Detail

      • tuple

        protected final Tuple tuple
    • Constructor Detail

      • HashableTuple

        public HashableTuple​(Tuple tuple)
    • Method Detail

      • hashCode

        public abstract int hashCode()
        Description copied from interface: KeyValue
        Returns a int hashcode for this KeyValue. hashcodes may collide for complex keys in large result sets.
        Specified by:
        hashCode in interface KeyValue
        hashCode in class Object
        32 bit hashcode for this KeyValue
      • getValueAsUniqueString

        public abstract String getValueAsUniqueString()
        Description copied from interface: KeyValue
        Returns an opaque unique String that can be used to identify this tuple. What this String looks like may change from release to release so should not be persisted.
        Specified by:
        getValueAsUniqueString in interface KeyValue
        - Unique String that identifies this KeyValue