ppotentials
Class PP_Variable
java.lang.Object
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
PP_Variable
public PP_Variable(String name,
String[] frame)
- Constructor:
- Parameters:
name
- The name of the variable.frame
- The variable's possible values.
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.