public final class Parameters extends Object implements Cloneable, Serializable
Traversal
.Modifier and Type | Field and Description |
---|---|
static Parameters |
EMPTY |
Constructor and Description |
---|
Parameters() |
Modifier and Type | Method and Description |
---|---|
Parameters |
clone() |
boolean |
contains(Object key)
Checks for existence of key in parameter set.
|
<E> List<E> |
get(Object key,
Supplier<E> defaultValue)
Gets the value of a key and if that key isn't present returns the default value from the
Supplier . |
<S,E> List<E> |
get(Traverser.Admin<S> traverser,
Object key,
Supplier<E> defaultValue)
Gets the list of values for a key, while resolving the values of any parameters that are
Traversal
objects. |
<S> Object[] |
getKeyValues(Traverser.Admin<S> traverser,
Object... exceptKeys)
Gets the array of keys/values of the parameters while resolving parameter values that contain
Traversal instances. |
Map<Object,List<Object>> |
getRaw(Object... exceptKeys)
Gets an immutable set of the parameters without evaluating them in the context of a
Traverser as
is done in getKeyValues(Traverser.Admin, Object...) . |
Set<String> |
getReferencedLabels()
Gets a list of all labels held in parameters that have a traversal as a value.
|
<S,E> List<Traversal.Admin<S,E>> |
getTraversals()
Gets all the
Traversal.Admin objects in the map of parameters. |
int |
hashCode() |
Object |
remove(Object key)
Remove a key from the parameter set.
|
void |
rename(Object oldKey,
Object newKey)
Renames a key in the parameter set.
|
void |
set(TraversalParent parent,
Object... keyValues)
Set parameters given key/value pairs.
|
String |
toString() |
public static final Parameters EMPTY
public boolean contains(Object key)
key
- the key to checktrue
if the key is present and false
otherwisepublic void rename(Object oldKey, Object newKey)
oldKey
- the key to renamenewKey
- the new name of the keypublic <S,E> List<E> get(Traverser.Admin<S> traverser, Object key, Supplier<E> defaultValue)
Traversal
objects.public <E> List<E> get(Object key, Supplier<E> defaultValue)
Supplier
.key
- the key to retrievedefaultValue
- the default value generator which if null will return an empty listpublic Object remove(Object key)
key
- the key to removepublic <S> Object[] getKeyValues(Traverser.Admin<S> traverser, Object... exceptKeys)
Traversal
instances.public Map<Object,List<Object>> getRaw(Object... exceptKeys)
Traverser
as
is done in getKeyValues(Traverser.Admin, Object...)
.exceptKeys
- keys to not include in the returned Map
public void set(TraversalParent parent, Object... keyValues)
public <S,E> List<Traversal.Admin<S,E>> getTraversals()
Traversal.Admin
objects in the map of parameters.public Set<String> getReferencedLabels()
public Parameters clone()
Copyright © 2013–2020 Apache Software Foundation. All rights reserved.