ComparatorNode
@ExperimentalAppSearchApi
class ComparatorNode : Node
Node that represents a numeric search expression between a property and a numeric value.
All numeric search expressions are represented by this Node by passing in a Comparator that represent one of the comparator operators available in the query language, a PropertyPath representing the property, and a numeric value to compare the property against.
This node represents comparators as defined in the Google AIP EBNF Filtering Definition.
Summary
Constants |
|
|---|---|
const Int |
EQUALS = 0 |
const Int |
GREATER_EQUALS = 4 |
const Int |
GREATER_THAN = 3 |
const Int |
LESS_EQUALS = 2 |
const Int |
LESS_THAN = 1 |
Public constructors |
|---|
ComparatorNode(comparator: Int, propertyPath: PropertyPath, value: Long)Construct a |
Public functions |
|
|---|---|
Boolean |
|
Int |
Get the |
PropertyPath |
Get the |
Long |
getValue()Get the numeric value being compared. |
Int |
hashCode() |
Unit |
setComparator(comparator: Int)Set the |
Unit |
setPropertyPath(propertyPath: PropertyPath)Set the |
Unit |
Set the numeric value being compared, i.e. the right side of the comparison. |
String |
toString()Get the query string representation of |
Constants
Public constructors
ComparatorNode
ComparatorNode(comparator: Int, propertyPath: PropertyPath, value: Long)
Construct a Node representing a numeric search expression between a property and a numeric value.
| Parameters | |
|---|---|
comparator: Int |
An |
propertyPath: PropertyPath |
A |
value: Long |
The numeric value being compared i.e. the right hand side of the comparison. |
Public functions
getPropertyPath
fun getPropertyPath(): PropertyPath
Get the PropertyPath being compared.
I.e. left hand side of the comparison represented by this node.
getValue
fun getValue(): Long
Get the numeric value being compared.
I.e. the right hand side of the comparison represented by this node.
setComparator
fun setComparator(comparator: Int): Unit
Set the @Comparator being used to compare the PropertyPath and value.
setPropertyPath
fun setPropertyPath(propertyPath: PropertyPath): Unit
Set the PropertyPath being compared, i.e. the left side of the comparison.
setValue
fun setValue(value: Long): Unit
Set the numeric value being compared, i.e. the right side of the comparison.
toString
fun toString(): String
Get the query string representation of ComparatorNode.
The string representation is the string representation of the property path joined from the left to the value being compared with the string representation of the Comparator.