@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.

(Mutable)List<Node!>

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

Unit
removeChild(index: Int)

Remove tbe child Node at the given index 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.

Public constructors

AndNode

Added in 1.1.0-alpha06
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-alpha06
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.

getChildren

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

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

removeChild

Added in 1.1.0-alpha06
fun removeChild(index: Int): Unit

Remove tbe child Node at the given index from the list of child nodes.

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

setChild

Added in 1.1.0-alpha06
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-alpha06
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.