public static class Children.Map<T> extends Children
add(org.openide.nodes.Node[])
and remove(T)
.Children.Array, Children.Keys<T>, Children.Map<T>, Children.SortedArray, Children.SortedMap<T>
Modifier and Type | Field and Description |
---|---|
protected Map<T,Node> |
nodes
A map to use to store children in.
|
Modifier | Constructor and Description |
---|---|
|
Map()
Constructs a new list using
HashMap . |
protected |
Map(Map<T,Node> m)
Constructs a new list with a supplied map object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Node[] arr)
Does nothing.
|
protected Map<T,Node> |
initMap()
Initialize some nodes.
|
protected void |
put(T key,
Node node)
Add one key and one node to the list.
|
protected void |
putAll(Map<? extends T,? extends Node> map)
Add a collection of new key/value pairs into the map.
|
protected void |
refresh()
Allows subclasses that directly modifies the
map with nodes to synchronize the state of the children.
|
protected void |
refreshKey(T key)
Allows subclasses that directly modifies the
map with nodes to synchronize the state of the children.
|
boolean |
remove(Node[] arr)
Does nothing.
|
protected void |
remove(T key)
Remove a given child node from the list by its key.
|
protected void |
removeAll(Collection<? extends T> keys)
Remove some children from the list by key.
|
addNotify, clone, create, createLazy, findChild, getNode, getNodeAt, getNodes, getNodes, getNodesCount, getNodesCount, isInitialized, nodes, removeNotify, snapshot
protected Map(Map<T,Node> m)
m
- the map to use for this listpublic Map()
HashMap
.protected final void refresh()
protected final void refreshKey(T key)
key
- the key that should be refreshedprotected final void putAll(Map<? extends T,? extends Node> map)
Node
s.map
- the map with pairs to addprotected final void put(T key, Node node)
key
- the keynode
- the nodeprotected final void removeAll(Collection<? extends T> keys)
keys
- collection of keys to removeprotected void remove(T key)
key
- key to removeprotected Map<T,Node> initMap()
The default implementation returns new HashMap (7)
.
public boolean add(Node[] arr)