Class Combination


  • public final class Combination
    extends java.lang.Object
    A encapsulation of a mapping from Parameter to Value. Can be used to represent an arbitrary combination or a test input.
    • 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 value null. 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 null if 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 null if there is not parameter with this name
      • getRawValue

        public java.lang.Object getRawValue​(Parameter parameter)
        The same as getValue(Parameter) only with Value.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 as null can also be a valid value object
      • getRawValue

        public java.lang.Object getRawValue​(java.lang.String parameterName)
        The same as getValue(Parameter) only with Value.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 as null can 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object