Package io.inversion.rql
Class Term
java.lang.Object
io.inversion.rql.Term
- All Implemented Interfaces:
Comparable<Term>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()intcopy()intchargetQuote()getTerm(int index) getTerms()getToken()getToken(int childIndex) booleanhasChildLeafToken(String... tokens) booleanintbooleanisLeaf()booleanisLeaf(int childIndex) booleanisQuoted()voidremoveTerm(Term term) replaceTerm(Term oldTerm, Term newTerm) intsize()stream()Returns a stream containing all Terms recursively.static TermtoString()withParent(Term parent)
-
Field Details
-
terms
-
parent
-
quote
public char quote -
token
-
-
Constructor Details
-
Term
protected Term() -
Term
-
-
Method Details
-
term
-
copy
-
compareTo
- Specified by:
compareToin interfaceComparable<Term>
-
getToken
-
getToken
-
hasToken
-
hasChildLeafToken
-
withToken
-
getParent
-
withParent
-
isLeaf
public boolean isLeaf() -
isLeaf
public boolean isLeaf(int childIndex) -
size
public int size() -
indexOf
-
getNumTerms
public int getNumTerms() -
getTerms
-
getTerm
-
replaceTerm
-
withTerms
-
withTerm
-
withTerm
-
withTerm
-
removeTerm
-
clear
public void clear() -
isQuoted
public boolean isQuoted() -
getQuote
public char getQuote() -
toString
-
stream
Returns a stream containing all Terms recursively.- Returns:
- this term and all children recursively
-