|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--com.svincent.moksa.CompoundTerm.ListWrapper
A wrapper for a CompoundTerm as a list.
There is a caveat: since Prolog can have lists like this:
[term, term, term | term], this list implementation
ignores the last term (as it is not part of the list proper). If
you want to see it, use the prologIterator method to
get a PrologIterator, which will provide you with
this information.
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
CompoundTerm.ListWrapper(CompoundTerm _compoundTerm)
|
|
| Method Summary | |
PrologTerm |
findUnifiable(PrologTerm key)
Finds the first term in this list which can unify (without variable binding) with the given key. |
java.lang.Object |
get(int index)
Part of java.util.List implementation. |
java.lang.String |
getOption(PrologTerm key)
|
java.util.Iterator |
iterator()
Part of java.util.List implementation. |
CompoundTerm.PrologIterator |
prologIterator()
|
int |
size()
Part of java.util.List implementation. |
java.lang.String |
tag()
|
| Methods inherited from class java.util.AbstractList |
add,
add,
addAll,
clear,
equals,
hashCode,
indexOf,
lastIndexOf,
listIterator,
listIterator,
remove,
removeRange,
set,
subList |
| Methods inherited from class java.util.AbstractCollection |
addAll,
contains,
containsAll,
isEmpty,
remove,
removeAll,
retainAll,
toArray,
toArray,
toString |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public CompoundTerm.ListWrapper(CompoundTerm _compoundTerm)
| Method Detail |
public CompoundTerm.PrologIterator prologIterator()
public PrologTerm findUnifiable(PrologTerm key)
Finds the first term in this list which can unify (without variable binding) with the given key.
For example, in the list:
[foo(3), bar (4)]
findUnifiable (bar (X)) would result in
bar(4)
If no such term is found, null is returned.
public java.lang.String getOption(PrologTerm key)
public java.util.Iterator iterator()
public java.lang.Object get(int index)
public int size()
public java.lang.String tag()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This is documentation for Moksa Prolog, which can be found at http://www.svincent.com/moksa/
Copyright © 1999 Shawn P. Vincent.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.