Class Value


  • public final class Value
    extends java.lang.Object
    Represents a value for a input parameter testModel in combinatorial testing. One could say that this class is not really needed as it just wraps an object, but it gives the additional distinction between this value object being null and no object being present. The id field is need for quicker comparison in hashCode() and equals(Object) and is only valid when comparing values inside one Parameter.
    • Constructor Summary

      Constructors 
      Constructor Description
      Value​(int id, java.lang.Object data)
      Creates a new value with the given id and object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object object)  
      java.lang.Object get()  
      int getId()  
      int hashCode()  
      java.lang.String toString()  
      static Value value​(int id, java.lang.Object data)
      Convenience method which can be statically imported for easier and more readable code.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Value

        public Value​(int id,
                     java.lang.Object data)
        Creates a new value with the given id and object
        Parameters:
        id - an id which should be unique inside the values parameter
        data - the data value to be saved. Can be null
    • Method Detail

      • getId

        public int getId()
        Returns:
        the values id which is unique only inside its parameter
      • get

        public java.lang.Object get()
        Returns:
        the actual value. May be null
      • 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
      • value

        public static Value value​(int id,
                                  java.lang.Object data)
        Convenience method which can be statically imported for easier and more readable code.
        Parameters:
        id - an id which should be unique inside the values parameter
        data - the data value to be saved. Can be null
        Returns:
        a value with the given id and data