OrNode
@ExperimentalAppSearchApi
class OrNode : Node
Node
that represents logical OR of nodes.
Summary
Public constructors |
---|
Constructor for |
Convenience constructor for |
Public functions |
|
---|---|
Unit |
Add a child node to the end of the current list of child nodes |
Boolean |
|
(Mutable)List<Node!> |
Get the list of nodes being logically ORed over by this node. |
Int |
getIndexOfChild(node: Node) Returns the index of the first instance of the node, or -1 if the node does not exist. |
Int |
hashCode() |
Boolean |
removeChild(node: Node) Removes the given |
Unit |
Replace the child node at the provided index with the provided |
Unit |
setChildren(childNodes: (Mutable)List<Node!>) Set the nodes being logically ORed over by this node. |
String |
toString() Gets the string representation of |
Public constructors
OrNode
OrNode(childNodes: (Mutable)List<Node!>)
Constructor for OrNode
that represents logical OR over all its child nodes.
Public functions
addChild
fun addChild(childNode: Node): Unit
Add a child node to the end of the current list of child nodes mChildren
.
getChildren
fun getChildren(): (Mutable)List<Node!>
Get the list of nodes being logically ORed over by this node.
getIndexOfChild
fun getIndexOfChild(node: Node): Int
Returns the index of the first instance of the node, or -1 if the node does not exist.
removeChild
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 |
|
setChild
fun setChild(index: Int, childNode: Node): Unit
Replace the child node at the provided index with the provided Node
.
setChildren
fun setChildren(childNodes: (Mutable)List<Node!>): Unit
Set the nodes being logically ORed over by this node.