public abstract class AbstractKey extends Object implements Key
Modifier | Constructor and Description |
---|---|
protected |
AbstractKey() |
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
|
int |
compareTo(Key o) |
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
|
boolean |
hasChildren()
Returns if the key has children
|
Key |
setKeys(Key[] keys)
Sets directly the children key values
|
Key |
setKeys(KeyNameMapper keyMapper,
Map<String,Key> keyFields)
This sets all the key payload values
|
long |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cloneKey, cloneKey, equals, getValue, hashCode, toString
compare
public Key setKeys(KeyNameMapper keyMapper, Map<String,Key> keyFields)
Key
public Key setKeys(Key[] keys)
Key
public Key addKey(KeyNameMapper keyMapper, String name, Key key)
Key
public Key getKey(int index)
Key
public Key getKey(KeyNameMapper keyMapper, String name)
Key
public boolean hasChildren()
Key
hasChildren
in interface Key
public Key[] getKeys()
Key
public int getKeyCount()
getKeyCount
in interface Key
public CompositeKey getChildrenAsComposite()
getChildrenAsComposite
in interface Key
public Map<String,Key> getKeysByName(KeyNameMapper keyMapper)
Key
getKeysByName
in interface Key
public int compareTo(Key o)
compareTo
in interface Comparable<Key>
Copyright © 2015. All rights reserved.