|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectalice.tuprolog.Term
alice.tuprolog.Struct
Struct class represents both compound prolog term and atom term (considered as 0-arity compound).
| Field Summary |
| Fields inherited from class alice.tuprolog.Term |
FALSE, TRUE |
| Constructor Summary | |
Struct()
Builds a structure representing an empty list |
|
Struct(java.lang.String f)
Builds a Struct representing an atom |
|
Struct(java.lang.String f,
Term at0)
Builds a compound, with one argument |
|
Struct(java.lang.String f,
Term[] argList)
Builds a compound, with an array of arguments |
|
Struct(java.lang.String f,
Term at0,
Term at1)
Builds a compound, with two arguments |
|
Struct(java.lang.String f,
Term at0,
Term at1,
Term at2)
Builds a compound, with three arguments |
|
Struct(java.lang.String f,
Term at0,
Term at1,
Term at2,
Term at3)
Builds a compound, with four arguments |
|
Struct(java.lang.String f,
Term at0,
Term at1,
Term at2,
Term at3,
Term at4)
Builds a compound, with five arguments |
|
Struct(java.lang.String f,
Term at0,
Term at1,
Term at2,
Term at3,
Term at4,
Term at5)
Builds a compound, with six arguments |
|
Struct(java.lang.String f,
Term at0,
Term at1,
Term at2,
Term at3,
Term at4,
Term at5,
Term at6)
Builds a compound, with seven arguments |
|
Struct(Term[] argList)
Builds a list specifying the elements |
|
Struct(Term h,
Term t)
Builds a list providing head and tail |
|
| Method Summary | |
Term |
copy()
Gets a copy of this structure |
Term |
getArg(int index)
Gets the i-th element of this structure No bound check is done |
Struct |
getArg(java.lang.String name)
Gets an argument inside this structure, given its name |
int |
getArity()
Gets the number of elements of this structure |
java.lang.String |
getName()
Gets the functor name of this structure |
Term |
getTerm()
Gets the actual term referred by this Term. |
Term |
getTerm(int index)
Gets the i-th element of this structure No bound check is done. |
boolean |
isAtom()
is this term a prolog (alphanumeric) atom? |
boolean |
isAtomic()
is this term a constant prolog term? |
boolean |
isClause()
|
boolean |
isCompound()
is this term a prolog compound term? |
boolean |
isEmptyList()
Is this structure an empty list? |
boolean |
isEqual(Term t)
Tests if this term is (logically) equal to another |
boolean |
isGreater(Term t)
is term greater than term t? |
boolean |
isGround()
is this term a ground term? |
boolean |
isList()
is this term a prolog list? |
boolean |
isNull()
is this term a null term? |
boolean |
isNumber()
is this term a prolog numeric term? |
boolean |
isStruct()
is this term a struct |
boolean |
isVar()
is this term a variable |
Term |
listHead()
Gets the head of this structure supposed to be a list |
java.util.Iterator |
listIterator()
Gets an iterator on the elements of this structure supposed to be a list |
int |
listSize()
Gets the number of elements of this structure supposed to be a list |
Struct |
listTail()
Gets the tail of this structure supposed to be alist |
java.lang.String |
toString()
Gets the string representation of this structure Specific representations are provided for lists and atoms. |
| Methods inherited from class alice.tuprolog.Term |
equals, getIterator, getRenamedCopy, match, parse, parse, resolveVariables, unify |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Struct(java.lang.String f)
public Struct(java.lang.String f,
Term at0)
public Struct(java.lang.String f,
Term at0,
Term at1)
public Struct(java.lang.String f,
Term at0,
Term at1,
Term at2)
public Struct(java.lang.String f,
Term at0,
Term at1,
Term at2,
Term at3)
public Struct(java.lang.String f,
Term at0,
Term at1,
Term at2,
Term at3,
Term at4)
public Struct(java.lang.String f,
Term at0,
Term at1,
Term at2,
Term at3,
Term at4,
Term at5)
public Struct(java.lang.String f,
Term at0,
Term at1,
Term at2,
Term at3,
Term at4,
Term at5,
Term at6)
public Struct(java.lang.String f,
Term[] argList)
public Struct()
public Struct(Term h,
Term t)
public Struct(Term[] argList)
| Method Detail |
public int getArity()
public java.lang.String getName()
public Term getArg(int index)
public Term getTerm(int index)
getArg(index).getTerm()
public boolean isNumber()
isNumber in class Termpublic boolean isStruct()
isStruct in class Termpublic boolean isVar()
isVar in class Termpublic boolean isNull()
Term
isNull in class Termpublic boolean isAtomic()
Term
isAtomic in class Termpublic boolean isCompound()
Term
isCompound in class Termpublic boolean isAtom()
Term
isAtom in class Termpublic boolean isList()
Term
isList in class Termpublic boolean isGround()
Term
isGround in class Termpublic boolean isClause()
public Term getTerm()
Term
getTerm in class Termpublic Struct getArg(java.lang.String name)
name - name of the structure
public boolean isGreater(Term t)
Term
isGreater in class Termpublic boolean isEqual(Term t)
Term
isEqual in class Termpublic Term copy()
copy in class Termpublic boolean isEmptyList()
public Term listHead()
public Struct listTail()
public int listSize()
public java.util.Iterator listIterator()
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||