|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.sics.prologbeans.Term
se.sics.prologbeans.PBCompound
public class PBCompound
PBCompound
is the Java representation of Prolog compound
terms and atoms (such as the empty list).
Field Summary | |
---|---|
protected Term[] |
arguments
|
Fields inherited from class se.sics.prologbeans.Term |
---|
name |
Method Summary | |
---|---|
Term |
getArgument(int index)
Returns the argument at the specified index. |
int |
getArity()
Returns the number of arguments of this compound term or 0 if this term is not a compound term. |
boolean |
isAtom()
Returns true if this term is an atom and
false otherwise. |
boolean |
isAtomic()
Returns true if this term is a constant
(e.g. integer, floating-point number, or atom) and
false if this term is a compound term or variable. |
java.lang.String |
toString()
Returns a string description of this term. |
Methods inherited from class se.sics.prologbeans.Term |
---|
doubleValue, floatValue, getName, intValue, isCompound, isFloat, isInteger, isList, isString, isVariable, longValue, stuffAtom |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final Term[] arguments
Method Detail |
---|
public boolean isAtom()
Term
true
if this term is an atom and
false
otherwise.
isAtom
in class Term
public boolean isAtomic()
Term
true
if this term is a constant
(e.g. integer, floating-point number, or atom) and
false
if this term is a compound term or variable.
isAtomic
in class Term
public Term getArgument(int index)
Term
getArgument
in class Term
index
- the (one based) index of the argument
public int getArity()
Term
getArity
in class Term
public java.lang.String toString()
Term
toString
in class Term
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |