se.sics.prologbeans
Class PBString

PBString is the .NET representation of Prolog strings (e.g. lists of integers that are interpretable as characters).

Fields inherited from class se.sics.prologbeans.PBList
nextTerm

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

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

Property Summary
int Arity
        
bool IsString
        
int Length
         Returns the number of characters in this string.
string String
         Returns the string value of this term.

Properties inherited from class se.sics.prologbeans.PBList
End, List

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

Properties inherited from class se.sics.prologbeans.Term
Compound, Float, Integer, 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 getCharAt(int index) or getString() for accessing the value of strings.

char getCharAt(int index)
         Returns the character at the specified index in this string. Note: characters are indexed from 1 to length
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.

Due to performance reasons this should be avoided if not 100% necessary. Please use getCharAt(int index) or getString() for accessing the value of strings.

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


Property Detail

Arity

public int Arity


IsString

public bool IsString


Length

public int Length

Returns the number of characters in this string.


String

public string String

Returns the string value of this term.

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 getCharAt(int index) or getString() for accessing the value of strings.

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

getCharAt

public char getCharAt(int index)

Returns the character at the specified index in this string. Note: characters are indexed from 1 to length

Parameters:
index - the (one based) index of the character in this string
Returns:
the character

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.

Due to performance reasons this should be avoided if not 100% necessary. Please use getCharAt(int index) or getString() for accessing the value of strings.

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

ToString

public string ToString()