PropertyRestrictNode
@ExperimentalAppSearchApi
public final class PropertyRestrictNode implements Node
Node that represents a property restrict.
A property restrict is an expression in the query language that allows a querier to restrict the results of a query expression to those contained in a given property path. Written as a query string, this node should be equivalent to the query `property:child`, where `property` is the property path to restrict results to and `child` is the query subexpression.
This node is a comparator that should correspond with HAS in the Google AIP EBNF Filtering Definition.
Summary
Public constructors |
|---|
PropertyRestrictNode(Constructor for building a |
Public methods |
|
|---|---|
boolean |
|
@NonNull Node |
getChild()Get the subexpression in the property restriction as a |
@NonNull List<Node> |
Get the child |
@NonNull PropertyPath |
Get the |
int |
hashCode() |
void |
Set the query subexpression in the property restriction (i.e. the right hand side of the property restrict sign (":")). |
void |
setPropertyPath(@NonNull PropertyPath propertyPath)Set the |
@NonNull String |
toString()Get the query string representation of |
Public constructors
PropertyRestrictNode
public PropertyRestrictNode(
@NonNull PropertyPath propertyPath,
@NonNull Node childNode
)
Constructor for building a PropertyRestrictNode that represents a restriction on a query subexpression by some property i.e. the query `property:subexpression`.
| Parameters | |
|---|---|
@NonNull PropertyPath propertyPath |
The property that will restrict results returned by the subexpression in the property restrict |
@NonNull Node childNode |
The subexpression to be restricted in the property restrict |
Public methods
getChild
public @NonNull Node getChild()
Get the subexpression in the property restriction as a Node (i.e. the right hand side of the property restrict sign (":")).
getChildren
public @NonNull List<Node> getChildren()
Get the child Node of PropertyRestrictNode as a list containing the only child Node.
getPropertyPath
public @NonNull PropertyPath getPropertyPath()
Get the PropertyPath in the property restriction (i.e. the left hand side of the property restrict sign (":")).
setChild
public void setChild(@NonNull Node childNode)
Set the query subexpression in the property restriction (i.e. the right hand side of the property restrict sign (":")).
setPropertyPath
public void setPropertyPath(@NonNull PropertyPath propertyPath)
Set the PropertyPath in the property restriction (i.e. the left hand side of the property restrict sign (":")).
toString
public @NonNull String toString()
Get the query string representation of PropertyRestrictNode.
The string representation is the string representation of the property path joined from the left to the query sub expression surrounded in parentheses with the property restrict symbol (":").