Class Terms
- java.lang.Object
-
- com.tangosol.coherence.dsltools.termtrees.Terms
-
public class Terms extends Object
Terms is a utility class that provides static convenience methods for the construction of Terms. Terms also provides a convenience interface for converting String in the TermLanguage to trees of Terms- Author:
- djl 2009.08.31
-
-
Field Summary
Fields Modifier and Type Field Description protected static CoherenceQueryLanguage
f_language
The defaultCoherenceQueryLanguage
used by this QueryHelper when no language is provided to methods.
-
Constructor Summary
Constructors Constructor Description Terms()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Term
create(String s)
Create a Tree of Terms using the Term Language in the given Stringstatic Term
create(String s, CoherenceQueryLanguage language)
Create a Tree of Terms using the Term Language in the given Stringstatic Term
newTerm(String sFunctor)
Construct a new TermNode with the given functor.static Term
newTerm(String sFunctor, Term t1)
Construct a new TermNode with the given functor and given Terms.static Term
newTerm(String sFunctor, Term[] aTerms)
Construct a new TermNode with the given functor and given Terms.static Term
newTerm(String sFunctor, Term t1, Term t2)
Construct a new TermNode with the given functor and given Terms.static Term
newTerm(String sFunctor, Term t1, Term t2, Term t3)
Construct a new TermNode with the given functor and given Terms.static Term
newTerm(String sFunctor, Term t1, Term t2, Term t3, Term t4)
Construct a new TermNode with the given functor and given Terms.static Term
newTerm(String sFunctor, Term t1, Term t2, Term t3, Term t4, Term t5)
Construct a new TermNode with the given functor and given Terms.
-
-
-
Field Detail
-
f_language
protected static final CoherenceQueryLanguage f_language
The defaultCoherenceQueryLanguage
used by this QueryHelper when no language is provided to methods.
-
-
Method Detail
-
newTerm
public static Term newTerm(String sFunctor)
Construct a new TermNode with the given functor.- Parameters:
sFunctor
- the functor for the Term- Returns:
- a term tree
-
newTerm
public static Term newTerm(String sFunctor, Term[] aTerms)
Construct a new TermNode with the given functor and given Terms.- Parameters:
sFunctor
- the functor for the TermaTerms
- an children of the node- Returns:
- a term tree
-
newTerm
public static Term newTerm(String sFunctor, Term t1)
Construct a new TermNode with the given functor and given Terms.- Parameters:
sFunctor
- the functor for the Termt1
- a child term- Returns:
- a term tree
-
newTerm
public static Term newTerm(String sFunctor, Term t1, Term t2)
Construct a new TermNode with the given functor and given Terms.- Parameters:
sFunctor
- the functor for the Termt1
- a child termt2
- a child term- Returns:
- a term tree
-
newTerm
public static Term newTerm(String sFunctor, Term t1, Term t2, Term t3)
Construct a new TermNode with the given functor and given Terms.- Parameters:
sFunctor
- the functor for the Termt1
- a child termt2
- a child termt3
- a child term- Returns:
- a term tree
-
newTerm
public static Term newTerm(String sFunctor, Term t1, Term t2, Term t3, Term t4)
Construct a new TermNode with the given functor and given Terms.- Parameters:
sFunctor
- the functor for the Termt1
- a child termt2
- a child termt3
- a child termt4
- a child term- Returns:
- a term tree
-
newTerm
public static Term newTerm(String sFunctor, Term t1, Term t2, Term t3, Term t4, Term t5)
Construct a new TermNode with the given functor and given Terms.- Parameters:
sFunctor
- the functor for the Termt1
- a child termt2
- a child termt3
- a child termt4
- a child termt5
- a child term- Returns:
- a term tree
-
create
public static Term create(String s)
Create a Tree of Terms using the Term Language in the given String- Parameters:
s
- String representing a Term tree- Returns:
- a term tree
-
create
public static Term create(String s, CoherenceQueryLanguage language)
Create a Tree of Terms using the Term Language in the given String- Parameters:
s
- String representing a Term tree- Returns:
- a term tree
-
-