se.sics.prologbeans
Class PBList

PBList is the .NET representation of Prolog lists.

Field Summary
se.sics.prologbeans.Term nextTerm
        

Fields inherited from class se.sics.prologbeans.PBCompound
arguments

Fields inherited from class se.sics.prologbeans.Term
name

Property Summary
int Arity
        
se.sics.prologbeans.Term End
         Returns the end of this list. For closed lists this element is the empty list.
int Length
         Returns the length of this list. Please note: this does not correspond to the predicate
length/1
.
bool List
        

Properties inherited from class se.sics.prologbeans.PBCompound
Atom, Atomic

Properties inherited from class se.sics.prologbeans.Term
Compound, Float, Integer, IsString, Name, Variable

Method Summary
se.sics.prologbeans.Term getArgument(int index)
         Returns the first or second argument of this list node. Only non-empty lists have arguments. Note: the arguments are indexed from 1 to 2. Due to performance reasons this should be avoided if not 100% necessary. Please use getTermAt(int index) for accessing the elements of lists.
se.sics.prologbeans.Term getTermAt(int index)
         Returns the element at the specified index in this list. Note: the elements are indexed from 1 to length.
string ToString()
        

Methods inherited from class se.sics.prologbeans.Term
doubleValue, floatValue, intValue, longValue, stuffAtom

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone


Field Detail

nextTerm

protected internal se.sics.prologbeans.Term nextTerm

Property Detail

Arity

public int Arity


End

public se.sics.prologbeans.Term End

Returns the end of this list. For closed lists this element is the empty list.


Length

public int Length

Returns the length of this list. Please note: this does not correspond to the predicate

length/1
.


List

public bool List

Method Detail

getArgument

public se.sics.prologbeans.Term getArgument(int index)

Returns the first or second argument of this list node. Only non-empty lists have arguments. Note: the arguments are indexed from 1 to 2. Due to performance reasons this should be avoided if not 100% necessary. Please use getTermAt(int index) for accessing the elements of lists.

Parameters:
index - the (one based) index of the argument
Returns:
the argument as a Term
Throws:
System.SystemException - if this term is not compound

getTermAt

public se.sics.prologbeans.Term getTermAt(int index)

Returns the element at the specified index in this list. Note: the elements are indexed from 1 to length.

Parameters:
index - the (one based) index of the element in this list
Returns:
the element as a Term

ToString

public string ToString()