vote
Class OperationCall

java.lang.Object
  |
  +--vote.SubNode
        |
        +--vote.OperationCall

public class OperationCall
extends SubNode

This class implements a operation call.

Author:
P. URSO
See Also:
Operation, NodeList

Field Summary
static vote.OperationCall NopCall
          NOP operation call.
 
Constructor Summary
OperationCall(vote.Operation id, vote.NodeList parameters)
          Constructor of the operation call node.
 
Method Summary
 vote.Node argument(int index)
          Returns the argument of the call at the specified position.
 vote.NodeList arguments()
          Returns the arguments of the call.
 boolean equals(Object node)
          Tests if some other object is "equal to" this one.
 vote.Operation identifier()
          Returns the identifier of the operation.
 String toString()
          Returns a string representation of this operation call node.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NopCall

public static vote.OperationCall NopCall
NOP operation call.

Constructor Detail

OperationCall

public OperationCall(vote.Operation id,
                     vote.NodeList parameters)
Constructor of the operation call node.

Parameters:
id - identifier of the operation.
parameters - arguments of the call.
Method Detail

arguments

public vote.NodeList arguments()
Returns the arguments of the call.

Returns:
the arguments of the call.

argument

public vote.Node argument(int index)
Returns the argument of the call at the specified position.

Parameters:
index - index of argument to return.
Returns:
the argument of the call at the specified position.

identifier

public vote.Operation identifier()
Returns the identifier of the operation.

Returns:
the identifier of the operation.

equals

public boolean equals(Object node)
Tests if some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
node - the term with which to compare.
Returns:
true if the other is a operation call node and their identifiers and arguments are equal; false otherwise.

toString

public String toString()
Returns a string representation of this operation call node. The string representation consists of either the name of operation and enclosed by "()", the list of arguments separated by ", ", either the two arguments of an infix operation separated by the representation of the operation.

Overrides:
toString in class Object
Returns:
a string representation of this term.