ppotentials
Class PP_Variable

java.lang.Object
  extended by ppotentials.PP_Variable
All Implemented Interfaces:
Serializable, FiniteVariable, Variable

public class PP_Variable
extends Object
implements FiniteVariable

This implementation of the DF_Variable interface represents variables as simple strings. Each variable knows its frame, reprsenting the variable's possible values.

Version:
1.0
Author:
Marc Pouly
See Also:
Serialized Form

Constructor Summary
PP_Variable(String name, String[] frame)
          Constructor:
 
Method Summary
 boolean equals(Object o)
           
 Object[] getFrame()
           
 int hashCode()
           
 String toString()
          Converts the current variable to a string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PP_Variable

public PP_Variable(String name,
                   String[] frame)
Constructor:

Parameters:
name - The name of the variable.
frame - The variable's possible values.
Method Detail

getFrame

public Object[] getFrame()
Specified by:
getFrame in interface FiniteVariable
See Also:
FiniteVariable.getFrame()

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object o)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Converts the current variable to a string.

Overrides:
toString in class Object
Returns:
The variable's string value.