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 class
Combination.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Combination.Builder
combination(Map.Entry<String,Object>... entries)
boolean
contains(Combination otherCombination)
Checks ifthis
combination contains all parameter-value pairs ofotherCombination
.static Combination
empty()
boolean
equals(Object object)
Map<Parameter,Value>
getParameterValueMap()
Object
getRawValue(Parameter parameter)
The same asgetValue(Parameter)
only withValue.get()
begin called afterwards.Object
getRawValue(String parameterName)
The same asgetValue(Parameter)
only withValue.get()
begin called afterwards.Value
getValue(Parameter parameter)
Retrieves the value of the specific parameter.Value
getValue(String parameterName)
Retrieves the value of the parameter corresponding to the name.int
hashCode()
static Combination
of(Map<Parameter,Value> parameterValueMap)
int
size()
String
toString()
-
-
-
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
null
if 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
null
if 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
null
if it is not mapped. This may be ambiguous asnull
can 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
null
if it is not mapped. This may be ambiguous asnull
can 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 ifthis
combination contains all parameter-value pairs ofotherCombination
.- Parameters:
otherCombination
- another combination- Returns:
true
if all parameter-value pairs ofotherCombination
are contained bythis
. Otherwise,false
.
-
combination
@SafeVarargs public static Combination.Builder combination(Map.Entry<String,Object>... entries)
-
-