@ExperimentalAppSearchApi
class OrNode : Node


Node that represents logical OR of nodes.

Summary

Public constructors

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

Constructor for OrNode that represents logical OR over all its child nodes.

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

Convenience constructor for OrNode that represents logical OR 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 ORed 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 ORed over by this node.

Public constructors

OrNode

Added in 1.1.0-alpha06
OrNode(childNodes: (Mutable)List<Node!>)

Constructor for OrNode that represents logical OR over all its child nodes.

Parameters
childNodes: (Mutable)List<Node!>

The nodes representing queries to be logically ORed over.

OrNode

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

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

Parameters
firstChild: Node

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

secondChild: Node

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

additionalChildren: Array<Node!>

Additional nodes to be ORed 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 ORed 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 ORed over by this node.

Parameters
childNodes: (Mutable)List<Node!>

A list of Node representing the nodes to be logically ORed over in this node.