public class OperandArray extends java.lang.Object implements java.lang.Iterable<Operand>
| Constructor and Description |
|---|
OperandArray(Expression parent,
Expression[] args) |
OperandArray(Expression parent,
Expression[] args,
OperandRole role) |
OperandArray(Expression parent,
Expression[] args,
OperandRole[] roles) |
| Modifier and Type | Method and Description |
|---|---|
Operand[] |
copy() |
int |
getNumberOfOperands()
Get the number of operands in the operand array
|
Operand |
getOperand(int n)
Get the operand whose identifying number is n.
|
Expression |
getOperandExpression(int n)
Get the child expression associated with the operand whose identifying number is n.
|
OperandRole[] |
getRoles()
Get the operand roles
|
java.util.Iterator<Operand> |
iterator()
Returns an iterator over elements of type
T. |
java.lang.Iterable<Expression> |
operandExpressions() |
java.lang.Iterable<Operand> |
operands()
Return a collection containing all the operands.
|
void |
setOperand(int n,
Expression child)
Set the value of the operand with integer n.
|
public OperandArray(Expression parent, Expression[] args)
public OperandArray(Expression parent, Expression[] args, OperandRole[] roles)
public OperandArray(Expression parent, Expression[] args, OperandRole role)
public java.util.Iterator<Operand> iterator()
T.iterator in interface java.lang.Iterable<Operand>public Operand[] copy()
public OperandRole[] getRoles()
public Operand getOperand(int n)
n - the identifier of the operand (counting from zero)java.lang.IllegalArgumentException - if there cannot be an operand at this positionpublic Expression getOperandExpression(int n)
n - the identifier of the operandjava.lang.IllegalArgumentException - if there cannot be an operand at this positionpublic java.lang.Iterable<Operand> operands()
public java.lang.Iterable<Expression> operandExpressions()
public void setOperand(int n,
Expression child)
n - identifies the expression to be set/replacedchild - the new subexpressionjava.lang.IllegalArgumentException - if the value of n identifies no operandpublic int getNumberOfOperands()
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.