|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ikrs.util.AbstractMapDelegation<K,V> ikrs.util.DefaultEnvironment<K,V>
public class DefaultEnvironment<K,V>
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class ikrs.util.AbstractMapDelegation |
---|
baseMap |
Constructor Summary | |
---|---|
DefaultEnvironment()
Create a new Environment having allowsMultipleChildNames() set to true. |
|
DefaultEnvironment(MapFactory<K,V> mapFactory)
Create a new Environment with the given MapFactory and having allowsMultipleChildNames() set to true. |
|
DefaultEnvironment(MapFactory<K,V> mapFactory,
boolean allowsMultipleChildNames)
Create a new Environment with the given MapFactory. |
|
DefaultEnvironment(MapFactory<K,V> mapFactory,
java.util.Comparator<K> keyComparator,
boolean allowsMultipleChildNames)
Create a new Environment with the given MapFactory. |
|
DefaultEnvironment(MapFactory<K,V> mapFactory,
java.util.Comparator<K> keyComparator,
Environment<K,V> parentEnvironment,
boolean allowsMultipleChildNames)
Create a new Environment with the given MapFactory. |
Method Summary | |
---|---|
boolean |
allowsMultipleChildNames()
This method indicates if the environment allows multiple names for child environments. |
Environment<K,V> |
createChild(java.lang.String name)
This method creates a new child environment and returns it. |
java.util.List<Environment<K,V>> |
getAllChildren()
This method simply returns a list containing _all_ children. |
Environment<K,V> |
getChild(java.lang.String name)
Get the child environment with the given name. |
int |
getChildCount()
This method returns the number of all children. |
java.util.List<Environment<K,V>> |
getChildren(java.lang.String name)
Get *all* children with the given name. |
Environment<K,V> |
getParent()
Get the environments parent. |
Environment<K,V> |
locateChild(Path<java.lang.String> path)
Locate a child in the environment tree structure. |
void |
removeAllChildren()
This method simply removes all children from this environment. |
Environment<K,V> |
removeChild(java.lang.String name)
This method removes the child with the given name and returns its old value. |
java.lang.String |
toString()
|
java.lang.StringBuffer |
toString(java.lang.StringBuffer b)
|
protected java.lang.StringBuffer |
toString(java.lang.StringBuffer b,
int indent)
|
Methods inherited from class ikrs.util.AbstractMapDelegation |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, makeIndent, put, putAll, remove, size, toString, toString, values |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Constructor Detail |
---|
public DefaultEnvironment() throws java.lang.NullPointerException
mapFactory
- The map factory that will be used to create
new internal child maps.
java.lang.NullPointerException
public DefaultEnvironment(MapFactory<K,V> mapFactory) throws java.lang.NullPointerException
mapFactory
- The map factory that will be used to create
new internal child maps.
java.lang.NullPointerException
public DefaultEnvironment(MapFactory<K,V> mapFactory, boolean allowsMultipleChildNames) throws java.lang.NullPointerException
mapFactory
- The map factory that will be used to create
new internal child maps.
java.lang.NullPointerException
public DefaultEnvironment(MapFactory<K,V> mapFactory, java.util.Comparator<K> keyComparator, boolean allowsMultipleChildNames) throws java.lang.NullPointerException
mapFactory
- The map factory that will be used to create
new internal child maps.keyComparator
- The key comparator for this map.
java.lang.NullPointerException
public DefaultEnvironment(MapFactory<K,V> mapFactory, java.util.Comparator<K> keyComparator, Environment<K,V> parentEnvironment, boolean allowsMultipleChildNames) throws java.lang.NullPointerException
mapFactory
- The map factory that will be used to create
new internal child maps.keyComparator
- The key comparator for this map.parentEnvironment
- The parent environment (if exists).
java.lang.NullPointerException
Method Detail |
---|
public boolean allowsMultipleChildNames()
allowsMultipleChildNames
in interface Environment<K,V>
public Environment<K,V> getParent()
getParent
in interface Environment<K,V>
public Environment<K,V> getChild(java.lang.String name)
getChild
in interface Environment<K,V>
name
- The child's name (if the child search is case sensitive
depends on the actual implementation).DefaultEnvironment
public Environment<K,V> locateChild(Path<java.lang.String> path)
locateChild
in interface Environment<K,V>
path
- The path that determines the desired child environment.
public java.util.List<Environment<K,V>> getAllChildren()
getAllChildren
in interface Environment<K,V>
public java.util.List<Environment<K,V>> getChildren(java.lang.String name)
getChildren
in interface Environment<K,V>
name
- The child's name (if the child search is case sensitive
depends on the actual implementation).DefaultEnvironment
public Environment<K,V> createChild(java.lang.String name)
createChild
in interface Environment<K,V>
name
- The child's name.public Environment<K,V> removeChild(java.lang.String name)
removeChild
in interface Environment<K,V>
name
- The child's name.public void removeAllChildren()
removeAllChildren
in interface Environment<K,V>
public int getChildCount()
getChildCount
in interface Environment<K,V>
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.StringBuffer toString(java.lang.StringBuffer b)
toString
in class AbstractMapDelegation<K,V>
protected java.lang.StringBuffer toString(java.lang.StringBuffer b, int indent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |