public class Parameters extends Object implements Cloneable, Serializable
Traversal.| Modifier and Type | Field and Description | 
|---|---|
| static Parameters | EMPTY | 
| protected Map<Object,List<Object>> | parameters | 
| protected Set<String> | referencedLabels | 
| protected List<Traversal.Admin<?,?>> | traversalsA cached list of traversals that serve as parameter values. | 
| Constructor and Description | 
|---|
| Parameters() | 
| Modifier and Type | Method and Description | 
|---|---|
| Parameters | clone() | 
| boolean | contains(Object key)Checks for existence of key in parameter set. | 
| boolean | contains(Object key,
        Object value)Checks for existence of a key and value in a 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  Traversalobjects. | 
| <S> Object[] | getKeyValues(Traverser.Admin<S> traverser,
            Object... exceptKeys)Gets the array of keys/values of the parameters while resolving parameter values that contain
  Traversalinstances. | 
| Map<Object,List<Object>> | getRaw(Object... exceptKeys)Gets an immutable set of the parameters without evaluating them in the context of a  Traverseras
 is done ingetKeyValues(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.Adminobjects in the map of parameters. | 
| int | hashCode() | 
| boolean | isEmpty()Check if the parameter set is empty. | 
| 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. | 
| int | size()Returns the size of parameter set. | 
| String | toString() | 
public static final Parameters EMPTY
protected List<Traversal.Admin<?,?>> traversals
set(TraversalParent, Object...) because when the parameter map is large the cost of iterating it repeatedly on the
 high number of calls to getTraversals() is great.public boolean contains(Object key)
key - the key to checktrue if the key is present and false otherwisepublic boolean contains(Object key, Object value)
key - the key to checkvalue - the value to checktrue if the key and value are present and false otherwisepublic int size()
public boolean isEmpty()
true if the size is zeropublic 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 Mappublic 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–2022 Apache Software Foundation. All rights reserved.