@ExperimentalAppSearchApi
class AndNode : Node


Node that represents logical AND of nodes.

Summary

Public constructors

AndNode(childNodes: (Mutable)List<Node!>)

Constructor for AndNode that represents logical AND over all its child nodes.

AndNode(
    firstChild: Node,
    secondChild: Node,
    additionalChildren: Array<Node!>
)

Convenience constructor for AndNode that represents logical AND over all its child nodes and takes in a varargs of nodes.

Public functions

Unit
addChild(childNode: Node)

Add a child node to the end of the current list of child nodes mChildren.

Boolean
equals(o: Any!)
(Mutable)List<Node!>

Get the list of nodes being logically ANDed over by this node.

Int

Returns the index of the first instance of the node, or -1 if the node does not exist.

Int
Boolean

Removes the given Node from the list of child nodes.

Unit
setChild(index: Int, childNode: Node)

Replace the child node at the provided index with the provided Node.

Unit
setChildren(childNodes: (Mutable)List<Node!>)

Set the nodes being logically ANDed over by this node.

String

Gets the string representation of AndNode.

Public constructors

AndNode

Added in 1.1.0-alpha07
AndNode(childNodes: (Mutable)List<Node!>)

Constructor for AndNode that represents logical AND over all its child nodes.

Parameters
childNodes: (Mutable)List<Node!>

The list of Node of at least size two representing queries to be logically ANDed over.

AndNode

AndNode(
    firstChild: Node,
    secondChild: Node,
    additionalChildren: Array<Node!>
)

Convenience constructor for AndNode that represents logical AND over all its child nodes and takes in a varargs of nodes.

Parameters
firstChild: Node

The first node to be ANDed over, which is required.

secondChild: Node

The second node to be ANDed over, which is required.

additionalChildren: Array<Node!>

Additional nodes to be ANDed over, which are optional.

Public functions

addChild

Added in 1.1.0-alpha07
fun addChild(childNode: Node): Unit

Add a child node to the end of the current list of child nodes mChildren.

Parameters
childNode: Node

A Node to add to the end of the list of child nodes.

equals

fun equals(o: Any!): Boolean

getChildren

fun getChildren(): (Mutable)List<Node!>

Get the list of nodes being logically ANDed over by this node.

getIndexOfChild

Added in 1.1.0-alpha07
fun getIndexOfChild(node: Node): Int

Returns the index of the first instance of the node, or -1 if the node does not exist.

hashCode

fun hashCode(): Int

removeChild

Added in 1.1.0-alpha07
fun removeChild(node: Node): Boolean

Removes the given Node from the list of child nodes. If multiple copies of the node exist, then the first Node that matches the provided Node will be removed. If the node does not exist, the list will be unchanged.

The list of child nodes must contain at least 3 nodes to perform this operation.

Returns
Boolean

true if the node was removed, false if the node was not removed i.e. the node was not found.

setChild

Added in 1.1.0-alpha07
fun setChild(index: Int, childNode: Node): Unit

Replace the child node at the provided index with the provided Node.

Parameters
index: Int

The index at which to replace the child node in the list of child nodes. Must be in range of the size of mChildren.

childNode: Node

The Node that is replacing the childNode at the provided index.

setChildren

Added in 1.1.0-alpha07
fun setChildren(childNodes: (Mutable)List<Node!>): Unit

Set the nodes being logically ANDed over by this node.

Parameters
childNodes: (Mutable)List<Node!>

A list of Node of at least size two representing the nodes to be logically ANDed over in this node.

toString

fun toString(): String

Gets the string representation of AndNode.

The string representation of AndNode is the string representation of AndNode's child nodes joined with "AND", all surrounded by parentheses.