USEJOLLYTOKEN| Constructor | Description |
|---|---|
LVar() |
Constructs a not initialized logical variable with default name.
|
LVar(java.lang.Object value) |
Constructs an initialized logical variable with given value and default name.
|
LVar(java.lang.String name) |
Constructs a not initialized logical variable with a specified name.
|
LVar(java.lang.String name,
java.lang.Object value) |
Constructs an initialized logical variable with given value and name.
|
LVar(java.lang.String name,
LVar lVar) |
Constructs a logical variable equal to the logical variable
lVar and with a specified name. |
LVar(LVar lVar) |
Constructs a logical variable equal to the logical variable
lVar. |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Object |
accept(jsetl.Visitor visitor) |
Needed for the visitor pattern.
|
LVar |
clone() |
Creates and returns a (bit-by-bit) copy of this object.
|
Constraint |
eq(java.lang.Object object) |
Constructs and returns a new constraint which demands that
this is equal to object |
boolean |
equals(java.lang.Object object) |
Tests if
this logical variable is equal to the given object. |
java.lang.Object |
getValue() |
Gets the value of this
LVar or null if the variable is not initialized. |
boolean |
isGround() |
Returns
true if the invocation object is ground, false if it isn't. |
Constraint |
neq(java.lang.Object object) |
Constructs and returns a new constraint which demands that
this is not equal to object. |
LVar |
setName(java.lang.String name) |
Sets the name of this logical variable and returns the logical variable
|
LVar |
setValue(java.lang.Object object) |
Sets the value of this
LVar to the parameter object. |
java.lang.String |
toString() |
Returns a string corresponding to the logical variable value.
|
public LVar()
public LVar(@NotNull java.lang.String name)
name - name of the variable.public LVar(@NotNull java.lang.Object value)
this.eq(value).value - value of the logical variable.public LVar(@NotNull java.lang.String name, @NotNull java.lang.Object value)
name - name of the logical variable.value - value of the logical variable.public LVar(@NotNull LVar lVar)
lVar.
The constructed logical variable has a default name.
Using this constructor is equivalent to creating a new unbound
logical variable and solving the constraint this.eq(lVar).lVar - the logical variable to which this is equal to.public LVar(@NotNull java.lang.String name, @NotNull LVar lVar)
lVar and with a specified name.
Using this constructor is equivalent to creating a new unbound
logical variable and solving the constraint this.eq(lVar).name - name of the logical variable.lVar - the logical variable to which this is equal to.@NotNull public LVar clone()
public boolean equals(@Nullable java.lang.Object object)
this logical variable is equal to the given object.
Returns true if and only if object is a reference to this
or to a logical variable that is bound to this or is an object that is equal
to the value of this logical variable.equals in class java.lang.Objectobject - object to check for equality.true if this and object are equal, false otherwise.@Nullable public java.lang.Object getValue()
LVar or null if the variable is not initialized.@NotNull public LVar setName(@NotNull java.lang.String name)
@NotNull public java.lang.String toString()
toString in class java.lang.Object@NotNull public LVar setValue(@NotNull java.lang.Object object)
LVar to the parameter object.object - the new value of this logical variableLVar modified.public boolean isGround()
true if the invocation object is ground, false if it isn't.@Nullable public java.lang.Object accept(@NotNull jsetl.Visitor visitor)
visitor - the visitor that wants to visit the object.visitor.visit(this).@NotNull public Constraint eq(@NotNull java.lang.Object object)
this is equal to objectobject - the other parameter of the constraint.@NotNull public Constraint neq(@NotNull java.lang.Object object)
this is not equal to object.object - the other parameter of the constraint.