Package de.rwth.swc.coffee4j.model
Class Value
- java.lang.Object
-
- de.rwth.swc.coffee4j.model.Value
-
public final class Value extends java.lang.ObjectRepresents 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 beingnulland no object being present. The id field is need for quicker comparison inhashCode()andequals(Object)and is only valid when comparing values inside oneParameter.
-
-
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 booleanequals(java.lang.Object object)java.lang.Objectget()intgetId()inthashCode()java.lang.StringtoString()static Valuevalue(int id, java.lang.Object data)Convenience method which can be statically imported for easier and more readable code.
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.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 parameterdata- the data value to be saved. Can benull- Returns:
- a value with the given id and data
-
-