Package com.streambase.liveview.client
Class HashableTuple
- java.lang.Object
-
- com.streambase.liveview.client.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()
-
-
Constructor Summary
Constructors Constructor Description HashableTuple(Tuple tuple)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract boolean
equals(Object other)
abstract String
getValueAsUniqueString()
Returns an opaque unique String that can be used to identify this tuple.abstract int
hashCode()
Returns a int hashcode for this KeyValue.
-
-
-
Field Detail
-
tuple
protected final Tuple tuple
-
-
Constructor Detail
-
HashableTuple
public HashableTuple(Tuple tuple)
-
-
Method Detail
-
equals
public abstract boolean equals(Object other)
-
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.
-
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 interfaceKeyValue
- Returns:
- - Unique String that identifies this KeyValue
-
-