Class Solution

java.lang.Object
  extended bySolution

public class Solution
extends java.lang.Object

holds proporties of the solution that may become relevant in a later version


Constructor Summary
Solution()
          Constructs a default Solution with the default properties: temp: 300.0, pH: 7.0, volume:100.0
Solution(double t, double p, double v)
          Constructs a Solution with specified temperature, pH and volume
Solution(java.util.Vector n, java.util.Vector v)
          Constructs a Solution from a vector of property names and a vector of corresponding property values.
 
Method Summary
 double getProperty(java.lang.String p)
          Gets the property requested by parameter
 void setProperty(java.lang.String n, double v)
          Sets the specified property to the specified value in the Vector of props.
 java.lang.String toString()
          Returns a String version of this Solution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Solution

public Solution()
Constructs a default Solution with the default properties: temp: 300.0, pH: 7.0, volume:100.0


Solution

public Solution(double t,
                double p,
                double v)
Constructs a Solution with specified temperature, pH and volume

Parameters:
t - Temperature
p - pH
v - Volume

Solution

public Solution(java.util.Vector n,
                java.util.Vector v)
Constructs a Solution from a vector of property names and a vector of corresponding property values.

Parameters:
n - Vector of property names (must be Vector of Strings)
v - Vector of property values (must be Vector of Doubles)
Method Detail

getProperty

public double getProperty(java.lang.String p)
Gets the property requested by parameter

Parameters:
p - The property requested
Returns:
The value of the property requested or -1.0

setProperty

public void setProperty(java.lang.String n,
                        double v)
Sets the specified property to the specified value in the Vector of props. If this property does not yet exist, it is added to the Vector.

Parameters:
n - Property
v - Value of the property to set to

toString

public java.lang.String toString()
Returns a String version of this Solution

Returns:
String