Class TupleList


  • public class TupleList
    extends Object
    Class representing a constraint via storing all sub-combinations which are not allowed. Instead of storing complete sub-combinations (with field having CombinationUtil.NO_VALUE), only the values of parameters actually constrained are saved. This means that if the test input [0, 1, 2, 3, 4] should not be allowed by this constraint and the constraint operates on the first and third parameter, only [0, 2] will be stored.
    • Constructor Detail

      • TupleList

        public TupleList​(int id,
                         int[] involvedParameters,
                         Collection<int[]> tuples)
        Creates a new tuple list out of a given id, the involved parameters, and a collection of tuples which should not be allowed. The tuples should be in the format specified by TupleList.
        Parameters:
        id - the id of the list. This should be unique per CompleteTestModel
        involvedParameters - the indices of all involved parameters
        tuples - all tuples which are not allowed
      • TupleList

        public TupleList​(int id,
                         int[] involvedParameters,
                         Collection<int[]> tuples,
                         boolean markedAsCorrect)
    • Method Detail

      • getId

        public int getId()
        Returns:
        the id of the list. Unique to its CompleteTestModel
      • getInvolvedParameters

        public int[] getInvolvedParameters()
        Returns:
        the indices of all parameters involved in the list
      • getTuples

        public List<int[]> getTuples()
        Returns:
        all tuples which should not be allowed in the format described in TupleList
      • isMarkedAsCorrect

        public boolean isMarkedAsCorrect()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object