Class HashableTuple

  • All Implemented Interfaces:
    KeyValue

    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
        Overrides:
        hashCode in class Object
        Returns:
        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
        Returns:
        - Unique String that identifies this KeyValue