org.openrdf.sail.federation.algebra
Class NaryOperator<Expr extends QueryModelNode>

java.lang.Object
  extended by org.openrdf.query.algebra.QueryModelNodeBase
      extended by org.openrdf.sail.federation.algebra.NaryOperator<Expr>
All Implemented Interfaces:
Cloneable, QueryModelNode
Direct Known Subclasses:
NaryTupleOperator

public abstract class NaryOperator<Expr extends QueryModelNode>
extends QueryModelNodeBase

An abstract superclass for operators which have (zero or more) arguments.


Constructor Summary
NaryOperator()
           
NaryOperator(Expr... args)
          Creates a new n-ary operator.
NaryOperator(List<? extends Expr> args)
          Creates a new n-ary operator.
 
Method Summary
 void addArg(Expr arg)
          Sets the arguments of this n-ary operator.
 void addArgs(List<? extends Expr> args)
          Sets the arguments of this n-ary tuple operator.
 NaryOperator<Expr> clone()
           
 Expr getArg(int idx)
          Gets the idx-th argument of this n-ary operator.
 List<? extends Expr> getArgs()
          Gets the arguments of this n-ary operator.
 int getNumberOfArguments()
          Gets the number of arguments of this n-ary operator.
 boolean removeArg(Expr arg)
           
 void replaceChildNode(QueryModelNode current, QueryModelNode replacement)
           
protected  void setArg(int idx, Expr arg)
          Sets the idx-th argument of this n-ary tuple operator.
 void setArgs(List<? extends Expr> args)
          Sets the arguments of this n-ary operator.
<X extends Exception>
void
visitChildren(QueryModelVisitor<X> visitor)
           
 
Methods inherited from class org.openrdf.query.algebra.QueryModelNodeBase
getParentNode, getSignature, nullEquals, replaceNodeInList, replaceWith, setParentNode, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openrdf.query.algebra.QueryModelNode
equals, visit
 

Constructor Detail

NaryOperator

public NaryOperator()

NaryOperator

public NaryOperator(Expr... args)
Creates a new n-ary operator.


NaryOperator

public NaryOperator(List<? extends Expr> args)
Creates a new n-ary operator.

Method Detail

getArgs

public List<? extends Expr> getArgs()
Gets the arguments of this n-ary operator.

Returns:
A copy of the current argument list.

getNumberOfArguments

public int getNumberOfArguments()
Gets the number of arguments of this n-ary operator.

Returns:
The number of arguments.

getArg

public Expr getArg(int idx)
Gets the idx-th argument of this n-ary operator.

Returns:
The operator's arguments.

addArgs

public void addArgs(List<? extends Expr> args)
Sets the arguments of this n-ary tuple operator.


addArg

public void addArg(Expr arg)
Sets the arguments of this n-ary operator.


setArgs

public void setArgs(List<? extends Expr> args)
Sets the arguments of this n-ary operator.


setArg

protected void setArg(int idx,
                      Expr arg)
Sets the idx-th argument of this n-ary tuple operator.


removeArg

public boolean removeArg(Expr arg)

visitChildren

public <X extends Exception> void visitChildren(QueryModelVisitor<X> visitor)
                   throws X extends Exception
Specified by:
visitChildren in interface QueryModelNode
Overrides:
visitChildren in class QueryModelNodeBase
Throws:
X extends Exception

replaceChildNode

public void replaceChildNode(QueryModelNode current,
                             QueryModelNode replacement)
Specified by:
replaceChildNode in interface QueryModelNode
Overrides:
replaceChildNode in class QueryModelNodeBase

clone

public NaryOperator<Expr> clone()
Specified by:
clone in interface QueryModelNode
Overrides:
clone in class QueryModelNodeBase


Copyright © 2004-2010 James Leigh Services Inc.. All Rights Reserved.