V - VariableT - Valuepublic class Value<V extends Variable<V,T>,T extends Value<V,T>> extends Object implements Comparable<T>, AssignmentComparable<T,V,T>
Variable,
Model,
Solver| Constructor and Description |
|---|
Value(V variable)
Constructor
|
Value(V variable,
Double value)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Assignment<V,T> assignment,
T value)
Compare two values by their value
|
int |
compareTo(T value)
Deprecated.
|
Set<T> |
conflicts()
Deprecated.
|
Set<T> |
conflicts(Assignment<V,T> assignment)
Returns a set of conflicting values with this value.
|
boolean |
equals(Object o)
By default, comparison is made on unique ids
|
String |
getDescription()
Values description -- for printing purposes
|
Object |
getExtra()
Deprecated.
|
long |
getId()
Unique id
|
String |
getName()
Values name -- for printing purposes (E.g., Monday 7:30)
|
int |
hashCode() |
boolean |
isConsistent(T value)
True, if the value is consistent with the given value
|
void |
setExtra(Object object)
Deprecated.
|
void |
setVariable(Variable variable)
Sets the variable which this value belongs to
|
double |
toDouble()
Deprecated.
|
double |
toDouble(Assignment<V,T> assignment)
Double representation.
|
String |
toString() |
boolean |
valueEquals(Assignment<V,T> assignment,
T value)
Comparison of two values which is based only on the value (not
appropriate variable etc.).
|
boolean |
valueEquals(T value)
Deprecated.
|
V |
variable()
Returns the variable which this value belongs to
|
public Value(V variable)
variable - variable which the value belongs topublic V variable()
public void setVariable(Variable variable)
variable - variable of this valuepublic long getId()
public String getName()
public String getDescription()
public double toDouble(Assignment<V,T> assignment)
assignment - current assignment@Deprecated public double toDouble()
toDouble(Assignment) instead.public boolean valueEquals(Assignment<V,T> assignment, T value)
toDouble(Assignment) is compared by default.assignment - current assignmentvalue - a value@Deprecated public boolean valueEquals(T value)
toDouble(Assignment) is compared by default.
Use valueEquals(Assignment, Value) instead.value - a valuepublic int compareTo(Assignment<V,T> assignment, T value)
@Deprecated public int compareTo(T value)
compareTo(Assignment, Value) and ValueComparator instead.@Deprecated public Object getExtra()
Extension).
Use ExtensionWithContext instead.@Deprecated public void setExtra(Object object)
Extension).
Use ExtensionWithContext instead.object - extra objectpublic boolean isConsistent(T value)
value - another value (of a different variable)Constraint.isConsistent(Value, Value) false)public Set<T> conflicts(Assignment<V,T> assignment)
assignment - current assignment@Deprecated public Set<T> conflicts()
conflicts(Assignment) instead.