Package de.rwth.swc.coffee4j.model
Class Combination
- java.lang.Object
-
- de.rwth.swc.coffee4j.model.Combination
-
public final class Combination extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCombination.BuilderRealization of the builder pattern for theCombinationclass.
-
Constructor Summary
Constructors Constructor Description Combination(java.util.Map<Parameter,Value> parameterValueMap)Creates a new combination with the mappings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Combination.Buildercombination()booleanequals(java.lang.Object object)java.util.Map<Parameter,Value>getParameterValueMap()java.lang.ObjectgetRawValue(Parameter parameter)The same asgetValue(Parameter)only withValue.get()begin called afterwards.java.lang.ObjectgetRawValue(java.lang.String parameterName)The same asgetValue(Parameter)only withValue.get()begin called afterwards.ValuegetValue(Parameter parameter)Retrieves the value of the specific parameter.ValuegetValue(java.lang.String parameterName)Retrives the value of the parameter corresponding to the name.inthashCode()intsize()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Combination
public Combination(java.util.Map<Parameter,Value> parameterValueMap)
Creates a new combination with the mappings.- Parameters:
parameterValueMap- the mapping. Must not be, nor contain as key or valuenull. All values to which parameters are mapped must come out of the respective parameters
-
-
Method Detail
-
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(java.lang.String parameterName)
Retrives 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 java.lang.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 java.lang.Object getRawValue(java.lang.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 java.util.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
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
combination
public static Combination.Builder combination()
-
-