uk.ac.ncl.cs.instantsoap.commandlineprocessor.variables
Class VariableExpression

java.lang.Object
  extended by uk.ac.ncl.cs.instantsoap.commandlineprocessor.variables.VariableExpression

public class VariableExpression
extends Object

An expression that contains both variables and constants.

Author:
Matthew Pocock

Constructor Summary
VariableExpression()
          Create a new expression with an empty list of components.
VariableExpression(List<VariableOrConstant> components)
          Create a new expression with the provided list of components.
VariableExpression(VariableOrConstant... components)
          Create a new expression with the provided components.
 
Method Summary
 void addComponent(VariableOrConstant component)
          Add a single component to the end of the components list.
 boolean equals(Object o)
           
 List<VariableOrConstant> getComponents()
          Get the components of this expression.
 int hashCode()
           
 void removeComponent(VariableOrConstant component)
          Remove a single component from its first occurance in the conponents list.
 void setComponents(List<VariableOrConstant> components)
          Set the components list.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableExpression

public VariableExpression()
Create a new expression with an empty list of components.


VariableExpression

public VariableExpression(List<VariableOrConstant> components)
Create a new expression with the provided list of components.

Parameters:
components - a List of components

VariableExpression

public VariableExpression(VariableOrConstant... components)
Create a new expression with the provided components.

Parameters:
components - the components
Method Detail

getComponents

public List<VariableOrConstant> getComponents()
Get the components of this expression.

Returns:
the components List

setComponents

public void setComponents(List<VariableOrConstant> components)
Set the components list.

Parameters:
components - the new List of components

addComponent

public void addComponent(VariableOrConstant component)
Add a single component to the end of the components list.

Parameters:
component - the VariableOrConstant to add

removeComponent

public void removeComponent(VariableOrConstant component)
Remove a single component from its first occurance in the conponents list.

Parameters:
component - the VariableOrConstant to remove

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2008. All Rights Reserved.