Class HashableMultiKey
java.lang.Object
com.espertech.esper.common.client.util.HashableMultiKey
- All Implemented Interfaces:
MultiKey
,Serializable
Multi-key made up of multiple values providing hashcode and equals semantics using
Object.hashCode()
and Arrays.equals(Object[], Object[])
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionHashableMultiKey
(Object key) Constructor for a single key object.HashableMultiKey
(Object[] keys) Constructor for multiple keys supplied in an object array.HashableMultiKey
(Object key1, Object key2) Constructor for a pair of key objects.HashableMultiKey
(Object key1, Object key2, Object key3) Constructor for three key objects.HashableMultiKey
(Object key1, Object key2, Object key3, Object key4) Constructor for four key objects. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
final Object
get
(int index) Returns the key object at the specified position.getKey
(int num) Returns the key value at the given indexObject[]
getKeys()
Returns keys.int
Returns the number of keys availablefinal int
hashCode()
final int
size()
Returns the number of key objects.final String
toString()
-
Field Details
-
EPTYPE
Type information
-
-
Constructor Details
-
HashableMultiKey
Constructor for multiple keys supplied in an object array.- Parameters:
keys
- is an array of key objects
-
HashableMultiKey
Constructor for a single key object.- Parameters:
key
- is the single key object
-
HashableMultiKey
Constructor for a pair of key objects.- Parameters:
key1
- is the first key objectkey2
- is the second key object
-
HashableMultiKey
Constructor for three key objects.- Parameters:
key1
- is the first key objectkey2
- is the second key objectkey3
- is the third key object
-
HashableMultiKey
Constructor for four key objects.- Parameters:
key1
- is the first key objectkey2
- is the second key objectkey3
- is the third key objectkey4
- is the fourth key object
-
-
Method Details
-
size
public final int size()Returns the number of key objects.- Returns:
- size of key object array
-
get
Returns the key object at the specified position.- Parameters:
index
- is the array position- Returns:
- key object at position
-
equals
-
getNumKeys
public int getNumKeys()Description copied from interface:MultiKey
Returns the number of keys available- Specified by:
getNumKeys
in interfaceMultiKey
- Returns:
- number of keys
-
getKey
Description copied from interface:MultiKey
Returns the key value at the given index -
getKeys
Returns keys.- Returns:
- keys object array
-
hashCode
public final int hashCode() -
toString
-