public final class ParamMap
extends java.lang.Object
implements scala.Serializable
Constructor and Description |
---|
ParamMap()
Creates an empty param map.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
apply(Param<T> param)
Gets the value of the input param or its default value if it does not exist.
|
boolean |
contains(Param<?> param)
Checks whether a parameter is explicitly specified.
|
ParamMap |
copy()
Creates a copy of this param map.
|
static ParamMap |
empty()
Returns an empty param map.
|
ParamMap |
filter(Params parent)
Filters this param map for the given parent.
|
<T> scala.Option<T> |
get(Param<T> param)
Optionally returns the value associated with a param.
|
<T> T |
getOrElse(Param<T> param,
T default_)
Returns the value associated with a param or a default value.
|
<T> ParamMap |
put(Param<T> param,
T value)
Puts a (param, value) pair (overwrites if the input param exists).
|
ParamMap |
put(ParamPair<?>... paramPairs)
Puts a list of param pairs (overwrites if the input params exists).
|
ParamMap |
put(scala.collection.Seq<ParamPair<?>> paramPairs)
Puts a list of param pairs (overwrites if the input params exists).
|
<T> scala.Option<T> |
remove(Param<T> param)
Removes a key from this map and returns its value associated previously as an option.
|
int |
size()
Number of param pairs in this map.
|
scala.collection.Seq<ParamPair<?>> |
toSeq()
Converts this param map to a sequence of param pairs.
|
java.lang.String |
toString() |
public static ParamMap empty()
public ParamMap put(ParamPair<?>... paramPairs)
paramPairs
- (undocumented)public <T> ParamMap put(Param<T> param, T value)
param
- (undocumented)value
- (undocumented)public ParamMap put(scala.collection.Seq<ParamPair<?>> paramPairs)
paramPairs
- (undocumented)public <T> scala.Option<T> get(Param<T> param)
param
- (undocumented)public <T> T getOrElse(Param<T> param, T default_)
param
- (undocumented)default_
- (undocumented)public <T> T apply(Param<T> param)
param
- (undocumented)public boolean contains(Param<?> param)
param
- (undocumented)public <T> scala.Option<T> remove(Param<T> param)
param
- (undocumented)public ParamMap filter(Params parent)
parent
- (undocumented)public ParamMap copy()
public java.lang.String toString()
toString
in class java.lang.Object
public scala.collection.Seq<ParamPair<?>> toSeq()
public int size()