|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.javimmutable.collections.tree.TreeNode<K,V>
org.javimmutable.collections.tree.EmptyNode<K,V>
@Immutable public class EmptyNode<K,V>
Method Summary | ||
---|---|---|
void |
addEntriesTo(Collection<JImmutableMap.Entry<K,V>> collection)
Adds this node's value and all of its children's value to the collection. |
|
Cursor<JImmutableMap.Entry<K,V>> |
cursor()
Returns a Cursor visiting all entries in sorted order. |
|
Holder<V> |
find(Comparator<K> props,
K key)
Return a (possibly empty) Holder containing the value matching key. |
|
Holder<JImmutableMap.Entry<K,V>> |
findEntry(Comparator<K> props,
K key)
Return a (possibly empty) Holder containing the an Entry matching key. |
|
V |
getValueOr(Comparator<K> props,
K key,
V defaultValue)
Return the value matching key or defaultValue if no match is found. |
|
boolean |
isEmpty()
Return true if this node contains no children or value. |
|
static
|
of()
|
Methods inherited from class org.javimmutable.collections.tree.TreeNode |
---|
assign, delete |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <K,V> EmptyNode<K,V> of()
public V getValueOr(Comparator<K> props, K key, V defaultValue)
TreeNode
getValueOr
in class TreeNode<K,V>
public Holder<V> find(Comparator<K> props, K key)
TreeNode
find
in class TreeNode<K,V>
public Holder<JImmutableMap.Entry<K,V>> findEntry(Comparator<K> props, K key)
TreeNode
findEntry
in class TreeNode<K,V>
public void addEntriesTo(Collection<JImmutableMap.Entry<K,V>> collection)
TreeNode
addEntriesTo
in class TreeNode<K,V>
@Nonnull public Cursor<JImmutableMap.Entry<K,V>> cursor()
TreeNode
cursor
in interface Cursorable<JImmutableMap.Entry<K,V>>
cursor
in class TreeNode<K,V>
public boolean isEmpty()
TreeNode
isEmpty
in class TreeNode<K,V>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |