Package com.tonic.analysis.query.ast
Class Step
- java.lang.Object
-
- com.tonic.analysis.query.ast.Step
-
public final class Step extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()booleanhasIndex()intindex()static Stepindexed(String keyword, int index)Creates an indexed step such as arg(0).Stringkeyword()static Stepof(String keyword)Creates an unindexed step.StringtoString()
-
-
-
Method Detail
-
of
public static Step of(String keyword)
Creates an unindexed step.- Parameters:
keyword- the step keyword- Returns:
- the step
-
indexed
public static Step indexed(String keyword, int index)
Creates an indexed step such as arg(0).- Parameters:
keyword- the step keywordindex- the explicit index- Returns:
- the step
-
keyword
public String keyword()
- Returns:
- the step keyword
-
hasIndex
public boolean hasIndex()
- Returns:
- whether an explicit index is present
-
index
public int index()
- Returns:
- the explicit index, only valid when hasIndex() is true
-
-