LCollection
, LVar
public abstract class LObject
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static boolean |
USEJOLLYTOKEN |
If
true the name of internal variables (that are not dummy IntLVar )
will be of the form "?" |
Constructor | Description |
---|---|
LObject() |
Constructs a not initialized logical object with default name.
|
LObject(java.lang.String name) |
Constructs a not initialized logical object with a specified name.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getName() |
Retrieves the name of this logical object.
|
abstract java.lang.Object |
getValue() |
Returns the value of the logical object, if it is bound, returns
null if it is not bound. |
Constraint |
in(java.util.Set<?> set) |
Constructs and returns a new constraint which demands that
this is an element of set . |
Constraint |
in(LSet lSet) |
Constructs and returns a new constraint which demands that
this is an element of lSet . |
boolean |
isBound() |
Checks whether this logical object is bound or not.
|
abstract boolean |
isGround() |
Returns
true if the invocation object is ground, false if it isn't. |
static boolean |
isGround(java.lang.Object object) |
Returns
true if the given object is ground (i.e. it is not a logical object or
it does not contain variables). |
Constraint |
nin(java.util.Set<?> set) |
Constructs and returns a new constraint which demands that
this is not an element of set . |
Constraint |
nin(LSet lSet) |
Constructs and returns a new constraint which demands that
this is not an element of lSet . |
void |
output() |
Prints the name and the value of this logical object to standard output.
|
LObject |
setName(java.lang.String name) |
Sets the name of this logical object and returns the logical object.
|
public static boolean USEJOLLYTOKEN
true
the name of internal variables (that are not dummy IntLVar
)
will be of the form "?" rather than "_N"+ unique ID.
SET TO TRUE ONLY FOR DEBUGGING PURPOSES.public LObject()
public LObject(@NotNull java.lang.String name)
name
- the name of the logical object.public static boolean isGround(@NotNull java.lang.Object object)
true
if the given object
is ground (i.e. it is not a logical object or
it does not contain variables).object
- test object.true
if the parameter is ground, false
if it isn't.@Nullable public abstract java.lang.Object getValue()
null
if it is not bound.@NotNull public java.lang.String getName()
public boolean isBound()
true
if this logical object is bound, false
otherwise.isInitialized()
@NotNull public LObject setName(@NotNull java.lang.String name)
name
- the new name for this logical object.public abstract boolean isGround()
true
if the invocation object is ground, false
if it isn't.true
if the object is ground, false
otherwise.public void output()
@NotNull public Constraint in(@NotNull LSet lSet)
this
is an element of lSet
.lSet
- the other parameter of the constraint.@NotNull public Constraint in(@NotNull java.util.Set<?> set)
this
is an element of set
.set
- the other parameter of the constraint.@NotNull public Constraint nin(@NotNull LSet lSet)
this
is not an element of lSet
.lSet
- the other parameter of the constraint.@NotNull public Constraint nin(@NotNull java.util.Set<?> set)
this
is not an element of set
.set
- the other parameter of the constraint.