net.sf.cpsolver.ifs.util
Class PrologFile.Term

java.lang.Object
  extended by net.sf.cpsolver.ifs.util.PrologFile.Term
Enclosing class:
PrologFile

public static class PrologFile.Term
extends Object

Term -- it can contain a text and a content (set of terms)


Constructor Summary
PrologFile.Term(List<PrologFile.Term> content)
          constructor
PrologFile.Term(PrologFile.Term[] content)
          constructor
PrologFile.Term(String text)
          constructor
PrologFile.Term(String text, List<PrologFile.Term> content)
          constructor
PrologFile.Term(String text, PrologFile.Term[] content)
          constructor
 
Method Summary
 Object clone()
           
 PrologFile.Term element(String name)
          element of content named name
 PrologFile.Term elementAt(int idx)
          idx-th element of content
 boolean equals(Object o)
           
 List<PrologFile.Term> getContent()
          return content
 String getText()
          return text
 int hashCode()
           
 int indexOf(String name)
          index of element of content named name
 int size()
          content size
 boolean toBoolean()
          return text as boolean
 boolean[] toBooleanArray()
          return content as boolean array
 double toDouble()
          return text as fouble
 int toInt()
          return text as int
 int[] toIntArray()
          return content as int array
 long toLong()
          return text as long
 String toString()
          string representation of term
 String[] toStringArray()
          return content as string array
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrologFile.Term

public PrologFile.Term(String text)
constructor


PrologFile.Term

public PrologFile.Term(List<PrologFile.Term> content)
constructor


PrologFile.Term

public PrologFile.Term(String text,
                       List<PrologFile.Term> content)
constructor


PrologFile.Term

public PrologFile.Term(String text,
                       PrologFile.Term[] content)
constructor


PrologFile.Term

public PrologFile.Term(PrologFile.Term[] content)
constructor

Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getText

public String getText()
return text


getContent

public List<PrologFile.Term> getContent()
return content


size

public int size()
content size


toInt

public int toInt()
return text as int


toLong

public long toLong()
return text as long


toDouble

public double toDouble()
return text as fouble


toBoolean

public boolean toBoolean()
return text as boolean


toBooleanArray

public boolean[] toBooleanArray()
return content as boolean array


toStringArray

public String[] toStringArray()
return content as string array


toIntArray

public int[] toIntArray()
return content as int array


elementAt

public PrologFile.Term elementAt(int idx)
idx-th element of content


element

public PrologFile.Term element(String name)
element of content named name


indexOf

public int indexOf(String name)
index of element of content named name


toString

public String toString()
string representation of term

Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public Object clone()
Overrides:
clone in class Object