|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.common.ParameterSet
public class ParameterSet
Represents a set of parameters.
| Constructor Summary | |
|---|---|
ParameterSet()
|
|
| Method Summary | ||
|---|---|---|
static ParameterSet |
asOne(ParameterSet[] params)
Converts the given parameter sets into one by merging them. |
|
void |
clear()
Clears all values in the set. |
|
ParameterSet |
clone()
|
|
boolean |
contains(String name)
Determines if this set contains the given parameter. |
|
ParameterSet |
copyAndPut(String name,
Object value)
Adds the specified parameter to this set. |
|
Iterable<Map.Entry<String,Object>> |
entrySet()
Returns all entries in the set. |
|
String |
getName()
Gets the name of this parameter set. |
|
boolean |
isEmpty()
Checks whether this parameter set is empty. |
|
boolean |
isLocked()
Checks if the set is locked. |
|
Iterator<Object> |
iterator()
|
|
Object |
lock()
Locks the set. |
|
static
|
merge(T primary,
ParameterSet... sets)
Merges a parameter set with other sets. |
|
Object |
optionalParameter(String name,
Object defaultValue)
Gets the parameter with the specified name. |
|
ParameterSet |
put(ParameterSet other)
Adds all parameters of the given set into this one. |
|
ParameterSet |
put(ParameterSet other,
boolean override)
Adds all parameters of the given set into this one. |
|
ParameterSet |
put(String name,
Object value)
Adds the specified parameter to this set. |
|
Object |
requiredParameter(String name)
Gets the parameter with the specified name. |
|
void |
setName(String name)
Sets the name of this parameter set. |
|
int |
size()
Returns the parameter count of this set. |
|
String |
toString()
|
|
void |
unlock(Object key)
Unlocks the set. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ParameterSet()
| Method Detail |
|---|
public final void setName(String name)
name - The name of this set.public Iterable<Map.Entry<String,Object>> entrySet()
public final String getName()
public Object optionalParameter(String name,
Object defaultValue)
name - The name of the parameter.defaultValue - The default value which is returned when no parameter was
found.
public Object requiredParameter(String name)
name - The name of the parameter.
IllegalArgumentException - if the name is null or if no parameter with the specified
name was found in the set.public boolean contains(String name)
name - The name of the parameter.
public int size()
public ParameterSet copyAndPut(String name,
Object value)
A copy of this set is created and returned. The original set stays unchanged.
name - The name of the parameter.value - The value of the parameter.
public ParameterSet put(ParameterSet other)
other - The other parameter set.
public ParameterSet put(ParameterSet other,
boolean override)
other - The other parameter set.override - Override flag.
public ParameterSet put(String name,
Object value)
name - The name of the parameter.value - The value of the parameter.
public String toString()
toString in class Objectpublic boolean isEmpty()
public void clear()
public ParameterSet clone()
clone in class Objectpublic Iterator<Object> iterator()
iterator in interface Iterable<Object>public Object lock()
Fails if the set is already locked.
unlock(Object)public void unlock(Object key)
Fails if the set is already unlocked.
key - The key to unlock the set.public boolean isLocked()
public static ParameterSet asOne(ParameterSet[] params)
params - The parameters.
public static <T extends ParameterSet> T merge(T primary,
ParameterSet... sets)
The order of the sets is important: Only parameters not present in the merged set will be added. No overriding occurs.
The primary set is not changed.
T - The type of the primary set.primary - The primary set. May not be null. This set will not get
changed. A new set is created.sets - List of sets which will get merged into the primary set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||