public interface Key extends ComparableKey<Key>
Modifier and Type | Method and Description |
---|---|
Key |
addKey(KeyNameMapper keyMapper,
String name,
Key key)
This adds a child Key to the key, in case the mapper cannot map will not add to child keys
and just ignore the added key
|
Key |
cloneKey()
Clone the current key without influencing this instance
|
Key |
cloneKey(boolean includeChildren)
Clone the current key without influencing this instance, whilst leaving the values
|
boolean |
equals(Object obj) |
CompositeKey |
getChildrenAsComposite() |
Key |
getKey(int index)
This retrieves a key at a given index
|
Key |
getKey(KeyNameMapper keyMapper,
String name)
This retrieves a specific payload value KeyValue object which contains the Key of the value
|
int |
getKeyCount() |
Key[] |
getKeys()
Returns an array of the child keys
|
Map<String,Key> |
getKeysByName(KeyNameMapper keyMapper)
This retrieves a map of all the child keys stored in this key
|
Object |
getValue() |
boolean |
hasChildren()
Returns if the key has children
|
int |
hashCode() |
Key |
setKeys(Key[] keys)
Sets directly the children key values
|
Key |
setKeys(KeyNameMapper keyMapper,
Map<String,Key> keys)
This sets all the key payload values
|
long |
size() |
String |
toString() |
compare
compareTo
Map<String,Key> getKeysByName(KeyNameMapper keyMapper)
Key[] getKeys()
boolean hasChildren()
CompositeKey getChildrenAsComposite()
Key getKey(KeyNameMapper keyMapper, String name)
keyMapper
- the mapper to map from name to indexname
- The name of the key field to retrieveKey getKey(int index)
index
- The index at which the key is heldKey addKey(KeyNameMapper keyMapper, String name, Key key)
key
- The child Key to add to the payload of this keykeyMapper
- the mapper to map from name to indexname
- The name that represents the field / keyKey setKeys(KeyNameMapper keyMapper, Map<String,Key> keys)
keyMapper
- the mapper to map from name to indexkeys
- the child keys to addKey setKeys(Key[] keys)
keys
- The keysKey cloneKey()
Key cloneKey(boolean includeChildren)
includeChildren
- True if child keys need to be included;long size()
int getKeyCount()
Object getValue()
Copyright © 2015. All rights reserved.