|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttom.engine.adt.tomconstraint.TomConstraintAbstractType
tom.engine.adt.tomconstraint.types.Constraint
tom.engine.adt.tomconstraint.types.constraint.AndConstraint
tom.engine.adt.tomconstraint.types.constraint.ConsAndConstraint
public final class ConsAndConstraint
Field Summary |
---|
Fields inherited from class tom.engine.adt.tomconstraint.types.Constraint |
---|
idConv |
Fields inherited from class tom.engine.adt.tomconstraint.TomConstraintAbstractType |
---|
atermFactory, factory |
Method Summary | |
---|---|
int |
compareTo(Object o)
Compares two terms. |
int |
compareToLPO(Object o)
Compares two terms. |
shared.SharedObject |
duplicate()
Copy the object and returns the copy |
boolean |
equivalent(shared.SharedObject obj)
Checks if a SharedObject is equivalent to the current object |
static Constraint |
fromTerm(aterm.ATerm trm,
ATermConverter atConv)
Apply a conversion on the ATerm contained in the String and returns a tom.engine.adt.tomconstraint.types.Constraint from it |
Visitable |
getChildAt(int index)
Returns the child at the specified index |
int |
getChildCount()
Returns the number of childs of the term |
Visitable[] |
getChildren()
Returns the whole children of the term |
Constraint |
getHeadAndConstraint()
Returns the attribute tom.engine.adt.tomconstraint.types.Constraint |
Constraint |
getTailAndConstraint()
Returns the attribute tom.engine.adt.tomconstraint.types.Constraint |
int |
hashCode()
Returns hashCode |
protected int |
hashFunction()
Compute a hashcode for this term. |
boolean |
isConsAndConstraint()
Returns true if the term is rooted by the symbol ConsAndConstraint |
static Constraint |
make(Constraint head,
Constraint tail)
Constructor that builds a term rooted by ConsAndConstraint |
Visitable |
setChildAt(int index,
Visitable v)
Set the child at the specified index |
Visitable |
setChildren(Visitable[] childs)
Set children to the term |
Constraint |
setHeadAndConstraint(Constraint set_arg)
Sets and returns the attribute tom.engine.adt.tomconstraint.types.Constraint |
Constraint |
setTailAndConstraint(Constraint set_arg)
Sets and returns the attribute tom.engine.adt.tomconstraint.types.Constraint |
String |
symbolName()
Returns the name of the symbol |
aterm.ATerm |
toATerm()
Returns an ATerm representation of this term. |
Methods inherited from class tom.engine.adt.tomconstraint.types.constraint.AndConstraint |
---|
add, addAll, append, clear, contains, containsAll, fromArray, getCollection, getCollectionAndConstraint, isEmpty, iterator, length, remove, removeAll, retainAll, reverse, size, toArray, toArray, toStringBuilder |
Methods inherited from class tom.engine.adt.tomconstraint.TomConstraintAbstractType |
---|
convertATermToBoolean, convertATermToChar, convertATermToDouble, convertATermToFloat, convertATermToInt, convertATermToLong, convertATermToString, getUniqueIdentifier, setUniqueIdentifier, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
equals |
Method Detail |
---|
public static Constraint make(Constraint head, Constraint tail)
public String symbolName()
symbolName
in class TomConstraintAbstractType
public shared.SharedObject duplicate()
duplicate
in interface shared.SharedObject
public int compareToLPO(Object o)
compareToLPO
in class TomConstraintAbstractType
o
- object to which this term is compared
ClassCastException
- in case of invalid arguments
RuntimeException
- if unable to compare childspublic int compareTo(Object o)
compareTo
in interface Comparable
compareTo
in class TomConstraintAbstractType
o
- object to which this term is compared
ClassCastException
- in case of invalid arguments
RuntimeException
- if unable to compare childspublic final int hashCode()
hashCode
in interface Collection<Constraint>
hashCode
in interface shared.SharedObject
hashCode
in class Object
public final boolean equivalent(shared.SharedObject obj)
equivalent
in interface shared.SharedObject
obj
- SharedObject to test
public boolean isConsAndConstraint()
isConsAndConstraint
in class Constraint
public Constraint getHeadAndConstraint()
getHeadAndConstraint
in class Constraint
public Constraint setHeadAndConstraint(Constraint set_arg)
setHeadAndConstraint
in class Constraint
set_arg
- the argument to set
public Constraint getTailAndConstraint()
getTailAndConstraint
in class Constraint
public Constraint setTailAndConstraint(Constraint set_arg)
setTailAndConstraint
in class Constraint
set_arg
- the argument to set
public aterm.ATerm toATerm()
toATerm
in class AndConstraint
public static Constraint fromTerm(aterm.ATerm trm, ATermConverter atConv)
trm
- ATerm to convert into a Gom termatConv
- ATerm Converter used to convert the ATerm
public int getChildCount()
getChildCount
in interface Visitable
public Visitable getChildAt(int index)
getChildAt
in interface Visitable
index
- index of the child to return; must be
nonnegative and less than the childCount
IndexOutOfBoundsException
- if the index out of rangepublic Visitable setChildAt(int index, Visitable v)
setChildAt
in interface Visitable
index
- index of the child to set; must be
nonnegative and less than the childCountv
- child to set at the specified index
IndexOutOfBoundsException
- if the index out of rangepublic Visitable setChildren(Visitable[] childs)
setChildren
in interface Visitable
childs
- array of children to set
IndexOutOfBoundsException
- if length of "childs" is different than 2public Visitable[] getChildren()
getChildren
in interface Visitable
protected int hashFunction()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |