hu.birot.OTKit.dataType
Class FormValuePair

java.lang.Object
  extended by hu.birot.OTKit.dataType.FormValuePair

public class FormValuePair
extends java.lang.Object

A new immutable data type: a pair whose first element is a Form and whose second value is a double. It can be used for several purposes, such as defining a MapForm, using lists of FormValuePairs.


Constructor Summary
FormValuePair(Form frm)
          Construct a FormValuePair from the form frm.
FormValuePair(Form frm, double v)
          Construct a FormValuePair from the form frm and the value v.
FormValuePair(java.lang.String str)
          Construct a FormValuePair from the string frm.
FormValuePair(java.lang.String str, double v)
          Construct a FormValuePair from the string frm and the value v.
 
Method Summary
 Form form()
          Returns the form of this form-value pair.
 double value()
          Returns the value of this form-value pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormValuePair

public FormValuePair(Form frm,
                     double v)
Construct a FormValuePair from the form frm and the value v.

Parameters:
frm - Form of the FormValuePair to be constructed.
v - Value of the FormValuePair to be constructed.

FormValuePair

public FormValuePair(Form frm)
Construct a FormValuePair from the form frm. The value will be the default value 0.

Parameters:
frm - Form of the FormValuePair to be constructed.

FormValuePair

public FormValuePair(java.lang.String str,
                     double v)
Construct a FormValuePair from the string frm and the value v. The form of the FormValuePair will be a string form containing the string frm.

Parameters:
str - String of the Form in the FormValuePair to be constructed.
v - Value of the FormValuePair to be constructed.

FormValuePair

public FormValuePair(java.lang.String str)
Construct a FormValuePair from the string frm. The form of the FormValuePair will be a string form containing the string frm. The value will be the default value 0.

Parameters:
str - String of the Form in the FormValuePair to be constructed.
Method Detail

form

public Form form()
Returns the form of this form-value pair.

Returns:
The form of this form-value pair.

value

public double value()
Returns the value of this form-value pair.

Returns:
The form of this form-value pair.