Class Combination
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.configuration.model.Combination
-
public final class Combination extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCombination.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Combination.Buildercombination(Map.Entry<String,Object>... entries)booleancontains(Combination otherCombination)Checks ifthiscombination contains all parameter-value pairs ofotherCombination.static Combinationempty()booleanequals(Object object)Map<Parameter,Value>getParameterValueMap()ObjectgetRawValue(Parameter parameter)The same asgetValue(Parameter)only withValue.get()begin called afterwards.ObjectgetRawValue(String parameterName)The same asgetValue(Parameter)only withValue.get()begin called afterwards.ValuegetValue(Parameter parameter)Retrieves the value of the specific parameter.ValuegetValue(String parameterName)Retrieves the value of the parameter corresponding to the name.inthashCode()static Combinationof(Map<Parameter,Value> parameterValueMap)intsize()StringtoString()
-
-
-
Method Detail
-
of
public static Combination of(Map<Parameter,Value> parameterValueMap)
-
empty
public static Combination empty()
-
getValue
public Value getValue(Parameter parameter)
Retrieves the value of the specific parameter.- Parameters:
parameter- a parameter- Returns:
- the value to which this parameter is mapped or
nullif it is not mapped
-
getValue
public Value getValue(String parameterName)
Retrieves the value of the parameter corresponding to the name.- Parameters:
parameterName- the name of a parameter. Should be unique in the combination- Returns:
- the value to which the parameter with this name i mapped or
nullif there is not parameter with this name
-
getRawValue
public Object getRawValue(Parameter parameter)
The same asgetValue(Parameter)only withValue.get()begin called afterwards.- Parameters:
parameter- a parameter- Returns:
- the raw object value to which this parameter is mapped or
nullif it is not mapped. This may be ambiguous asnullcan also be a valid value object
-
getRawValue
public Object getRawValue(String parameterName)
The same asgetValue(Parameter)only withValue.get()begin called afterwards.- Parameters:
parameterName- the name of a parameter. Should be unique in the combination- Returns:
- the raw object value to which this parameter is mapped or
nullif it is not mapped. This may be ambiguous asnullcan also be a valid value object
-
getParameterValueMap
public Map<Parameter,Value> getParameterValueMap()
- Returns:
- a copy of the complete map of all parameter value mappings
-
size
public int size()
- Returns:
- the number of parameters which are mapped to a value
-
contains
public boolean contains(Combination otherCombination)
Checks ifthiscombination contains all parameter-value pairs ofotherCombination.- Parameters:
otherCombination- another combination- Returns:
trueif all parameter-value pairs ofotherCombinationare contained bythis. Otherwise,false.
-
combination
@SafeVarargs public static Combination.Builder combination(Map.Entry<String,Object>... entries)
-
-