public class DefaultParameterTree extends java.lang.Object implements ParameterTree
ParameterServer
.Modifier and Type | Method and Description |
---|---|
void |
addParameterListener(GraphName name,
ParameterListener listener)
Subscribes to changes to the specified parameter.
|
void |
addParameterListener(java.lang.String name,
ParameterListener listener) |
void |
delete(GraphName name)
Deletes a specified parameter.
|
void |
delete(java.lang.String name) |
boolean |
getBoolean(GraphName name) |
boolean |
getBoolean(GraphName name,
boolean defaultValue) |
boolean |
getBoolean(java.lang.String name) |
boolean |
getBoolean(java.lang.String name,
boolean defaultValue) |
double |
getDouble(GraphName name) |
double |
getDouble(GraphName name,
double defaultValue) |
double |
getDouble(java.lang.String name) |
double |
getDouble(java.lang.String name,
double defaultValue) |
int |
getInteger(GraphName name) |
int |
getInteger(GraphName name,
int defaultValue) |
int |
getInteger(java.lang.String name) |
int |
getInteger(java.lang.String name,
int defaultValue) |
java.util.List<?> |
getList(GraphName name) |
java.util.List<?> |
getList(GraphName name,
java.util.List<?> defaultValue) |
java.util.List<?> |
getList(java.lang.String name) |
java.util.List<?> |
getList(java.lang.String name,
java.util.List<?> defaultValue) |
java.util.Map<?,?> |
getMap(GraphName name) |
java.util.Map<?,?> |
getMap(GraphName name,
java.util.Map<?,?> defaultValue) |
java.util.Map<?,?> |
getMap(java.lang.String name) |
java.util.Map<?,?> |
getMap(java.lang.String name,
java.util.Map<?,?> defaultValue) |
java.util.List<GraphName> |
getNames() |
java.lang.String |
getString(GraphName name) |
java.lang.String |
getString(GraphName name,
java.lang.String defaultValue) |
java.lang.String |
getString(java.lang.String name) |
java.lang.String |
getString(java.lang.String name,
java.lang.String defaultValue) |
boolean |
has(GraphName name) |
boolean |
has(java.lang.String name) |
static DefaultParameterTree |
newFromNodeIdentifier(NodeIdentifier nodeIdentifier,
java.net.URI masterUri,
NameResolver resolver,
ParameterManager parameterManager) |
GraphName |
search(GraphName name)
Search for parameter key on the Parameter Server.
|
GraphName |
search(java.lang.String name) |
void |
set(GraphName name,
boolean value) |
void |
set(GraphName name,
double value) |
void |
set(GraphName name,
int value) |
void |
set(GraphName name,
java.util.List<?> value) |
void |
set(GraphName name,
java.util.Map<?,?> value) |
void |
set(GraphName name,
java.lang.String value) |
void |
set(java.lang.String name,
boolean value) |
void |
set(java.lang.String name,
double value) |
void |
set(java.lang.String name,
int value) |
void |
set(java.lang.String name,
java.util.List<?> value) |
void |
set(java.lang.String name,
java.util.Map<?,?> value) |
void |
set(java.lang.String name,
java.lang.String value) |
public static DefaultParameterTree newFromNodeIdentifier(NodeIdentifier nodeIdentifier, java.net.URI masterUri, NameResolver resolver, ParameterManager parameterManager)
public boolean has(GraphName name)
has
in interface ParameterTree
name
- the parameter nametrue
if a parameter with the given name exists,
false
otherwisepublic boolean has(java.lang.String name)
has
in interface ParameterTree
ParameterTree.has(GraphName)
public void delete(GraphName name)
ParameterTree
delete
in interface ParameterTree
name
- the parameter namepublic void delete(java.lang.String name)
delete
in interface ParameterTree
ParameterTree.delete(GraphName)
public GraphName search(GraphName name)
ParameterTree
ParameterServer
finds a matching key.search
in interface ParameterTree
name
- the parameter name to search fornull
if no matching
parameter was foundpublic GraphName search(java.lang.String name)
search
in interface ParameterTree
ParameterTree.search(GraphName)
public java.util.List<GraphName> getNames()
getNames
in interface ParameterTree
public void addParameterListener(GraphName name, ParameterListener listener)
ParameterTree
addParameterListener
in interface ParameterTree
name
- the parameter name to subscribe tolistener
- a ParameterListener
that will be called when the
subscribed parameter changespublic void addParameterListener(java.lang.String name, ParameterListener listener)
addParameterListener
in interface ParameterTree
ParameterTree.addParameterListener(GraphName, ParameterListener)
public void set(GraphName name, boolean value)
set
in interface ParameterTree
name
- the parameter namevalue
- the value that the parameter will be set topublic void set(java.lang.String name, boolean value)
set
in interface ParameterTree
ParameterTree.set(GraphName, boolean)
public void set(GraphName name, int value)
set
in interface ParameterTree
name
- the parameter namevalue
- the value that the parameter will be set topublic void set(java.lang.String name, int value)
set
in interface ParameterTree
ParameterTree.set(GraphName, int)
public void set(GraphName name, double value)
set
in interface ParameterTree
name
- the parameter namevalue
- the value that the parameter will be set topublic void set(java.lang.String name, double value)
set
in interface ParameterTree
ParameterTree.set(GraphName, double)
public void set(GraphName name, java.lang.String value)
set
in interface ParameterTree
name
- the parameter namevalue
- the value that the parameter will be set topublic void set(java.lang.String name, java.lang.String value)
set
in interface ParameterTree
ParameterTree.set(GraphName, String)
public void set(GraphName name, java.util.List<?> value)
set
in interface ParameterTree
name
- the parameter namevalue
- the value that the parameter will be set topublic void set(java.lang.String name, java.util.List<?> value)
set
in interface ParameterTree
ParameterTree.set(GraphName, List)
public void set(GraphName name, java.util.Map<?,?> value)
set
in interface ParameterTree
name
- the parameter namevalue
- the value that the parameter will be set topublic void set(java.lang.String name, java.util.Map<?,?> value)
set
in interface ParameterTree
ParameterTree.set(GraphName, Map)
public boolean getBoolean(GraphName name)
getBoolean
in interface ParameterTree
name
- the parameter namepublic boolean getBoolean(java.lang.String name)
getBoolean
in interface ParameterTree
ParameterTree.getBoolean(GraphName)
public boolean getBoolean(GraphName name, boolean defaultValue)
getBoolean
in interface ParameterTree
name
- the parameter namedefaultValue
- the default valuepublic boolean getBoolean(java.lang.String name, boolean defaultValue)
getBoolean
in interface ParameterTree
ParameterTree.getBoolean(GraphName, boolean)
public int getInteger(GraphName name)
getInteger
in interface ParameterTree
name
- the parameter namepublic int getInteger(java.lang.String name)
getInteger
in interface ParameterTree
ParameterTree.getInteger(GraphName)
public int getInteger(GraphName name, int defaultValue)
getInteger
in interface ParameterTree
name
- the parameter namedefaultValue
- the default valuepublic int getInteger(java.lang.String name, int defaultValue)
getInteger
in interface ParameterTree
ParameterTree.getInteger(GraphName, int)
public double getDouble(GraphName name)
getDouble
in interface ParameterTree
name
- the parameter namepublic double getDouble(java.lang.String name)
getDouble
in interface ParameterTree
ParameterTree.getDouble(GraphName)
public double getDouble(GraphName name, double defaultValue)
getDouble
in interface ParameterTree
name
- the parameter namedefaultValue
- the default valuepublic double getDouble(java.lang.String name, double defaultValue)
getDouble
in interface ParameterTree
ParameterTree.getDouble(GraphName, double)
public java.lang.String getString(GraphName name)
getString
in interface ParameterTree
name
- the parameter namepublic java.lang.String getString(java.lang.String name)
getString
in interface ParameterTree
ParameterTree.getString(GraphName)
public java.lang.String getString(GraphName name, java.lang.String defaultValue)
getString
in interface ParameterTree
name
- the parameter namedefaultValue
- the default valuepublic java.lang.String getString(java.lang.String name, java.lang.String defaultValue)
getString
in interface ParameterTree
ParameterTree.getString(GraphName, String)
public java.util.List<?> getList(GraphName name)
getList
in interface ParameterTree
name
- the parameter namepublic java.util.List<?> getList(java.lang.String name)
getList
in interface ParameterTree
ParameterTree.getList(GraphName)
public java.util.List<?> getList(GraphName name, java.util.List<?> defaultValue)
getList
in interface ParameterTree
name
- the parameter namedefaultValue
- the default valuepublic java.util.List<?> getList(java.lang.String name, java.util.List<?> defaultValue)
getList
in interface ParameterTree
ParameterTree.getList(GraphName, List)
public java.util.Map<?,?> getMap(GraphName name)
getMap
in interface ParameterTree
name
- the parameter namepublic java.util.Map<?,?> getMap(java.lang.String name)
getMap
in interface ParameterTree
ParameterTree.getMap(GraphName)
public java.util.Map<?,?> getMap(GraphName name, java.util.Map<?,?> defaultValue)
getMap
in interface ParameterTree
name
- the parameter namedefaultValue
- the default valuepublic java.util.Map<?,?> getMap(java.lang.String name, java.util.Map<?,?> defaultValue)
getMap
in interface ParameterTree
ParameterTree.getMap(GraphName, Map)