Class Modifier
java.lang.Object
org.z3950.zing.cql.Modifier
Represents a single modifier, consisting of three elements: a type,
a comparison and a value. For example, "distance", "<", "3". The
type is mandatory; either the comparison and value must both occur,
or neither must.
This class is used only by ModifierSet.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the comparison with which the Modifier was created.intgetEnd()Returns the exclusive source end, suitable forquery.substring(getStart(), getEnd()).intgetStart()Returns the inclusive source start of this modifier (including the leading slash).getType()Returns the type with which the Modifier was created.getValue()Returns the value with which the Modifier was created.toCQL()
-
Constructor Details
-
Modifier
-
Modifier
Creates a new Modifier with the specified type but no comparison or value.
-
-
Method Details
-
getStart
public int getStart()Returns the inclusive source start of this modifier (including the leading slash). Offsets are zero-based UTF-16 indexes into the original query, excluding surrounding whitespace. Manually constructed objects and implicit defaults have no source location and return -1. Locations describe the original parse and are not updated after tree modifications.- Returns:
- source start, or -1 when unavailable
-
getEnd
public int getEnd()Returns the exclusive source end, suitable forquery.substring(getStart(), getEnd()).- Returns:
- source end, or -1 when unavailable
- See Also:
-
getType
Returns the type with which the Modifier was created. -
getComparison
Returns the comparison with which the Modifier was created. -
getValue
Returns the value with which the Modifier was created. -
toCQL
-