|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.ugos.JIProlog.engine.JIPTerm
|
+--com.ugos.JIProlog.engine.JIPCons
JIPList wraps a prolog cons (a cons is composed by a set of terms separated by comma eventually enclosed in parenthesis: a,b,c or (a,b,c,).
JIPTerm,
Serialized Form| Field Summary | |
static JIPCons |
NIL
Empty cons or nil |
| Method Summary | |
static JIPCons |
append(JIPCons cons1,
JIPCons cons2)
Returns a new JIPCons object by appending cons2 to cons1 |
static JIPCons |
create(JIPTerm head,
JIPTerm tail)
Creates a new cons object |
JIPTerm |
getHead()
Returns the head of this JIPCons object |
int |
getHeight()
Returns the number of elements in this cons object. |
JIPTerm |
getNth(int n)
Returns the nth term in this cons. |
JIPTerm |
getTail()
Returns the tail of this JIPCons object |
boolean |
isNIL()
Returns true if this cons is nil. |
JIPCons |
reverse()
Returns a new JIPCons object by reversing this JIPCons object |
| Methods inherited from class com.ugos.JIProlog.engine.JIPTerm |
clear, clone, getVariables, getVariablesTable, toString, toString, toStringq, unifiable, unify |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final JIPCons NIL
| Method Detail |
public static final JIPCons create(JIPTerm head,
JIPTerm tail)
head - the head of the constail - the tail the cons
JIPTerm
public static final JIPCons append(JIPCons cons1,
JIPCons cons2)
cons1 - first conscons2 - cons to append at the end of the first one.
public final JIPCons reverse()
public final JIPTerm getHead()
JIPTermpublic final JIPTerm getTail()
JIPTermpublic final JIPTerm getNth(int n)
n - index ot the term to extract
JIPTermpublic final boolean isNIL()
public final int getHeight()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||