public static class PrologFile.Term extends Object
Constructor and Description |
---|
Term(List<PrologFile.Term> content)
constructor
|
Term(PrologFile.Term[] content)
constructor
|
Term(String text)
constructor
|
Term(String text,
List<PrologFile.Term> content)
constructor
|
Term(String text,
PrologFile.Term[] content)
constructor
|
Modifier and Type | Method and Description |
---|---|
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 double
|
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
|
public Term(List<PrologFile.Term> content)
content
- inner termspublic Term(String text, List<PrologFile.Term> content)
text
- name of the termcontent
- inner termspublic Term(String text, PrologFile.Term[] content)
text
- name of the termcontent
- inner termspublic Term(PrologFile.Term[] content)
content
- inner termspublic List<PrologFile.Term> getContent()
public int size()
public int toInt()
public long toLong()
public double toDouble()
public boolean toBoolean()
public boolean[] toBooleanArray()
public String[] toStringArray()
public int[] toIntArray()
public PrologFile.Term elementAt(int idx)
idx
- index of the inner termpublic PrologFile.Term element(String name)
name
- name of the inner termpublic int indexOf(String name)
name
- name of the inner term