|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> ikrs.util.MapDelegation<K,V> ikrs.util.EnvironmentDelegation<K,V>
public class EnvironmentDelegation<K,V>
The EnvironmentDelegation class is a wrapper for anonymous environments. The passed environment will become the underlying core and method calls to the delegation's environment-methods will be directly forwarded to the core.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Constructor Summary | |
---|---|
EnvironmentDelegation(Environment<K,V> core)
Creates a new EnvironmentDelegation with the given core environment. |
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; there might be different children with the same name! The method will return the first match then. |
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. |
Methods inherited from class ikrs.util.MapDelegation |
---|
clear, entrySet, put, putAll, remove, toString |
Methods inherited from class java.util.AbstractMap |
---|
clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, size, values |
Methods inherited from class java.lang.Object |
---|
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 EnvironmentDelegation(Environment<K,V> core) throws java.lang.NullPointerException
core
- The core environment (must not be null).
java.lang.NullPointerException
- if core is null.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>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |