Venice 0.7beta

org.mov.ui
Class ExpressionResult

java.lang.Object
  extended by org.mov.ui.ExpressionResult
All Implemented Interfaces:
java.lang.Comparable

public class ExpressionResult
extends java.lang.Object
implements java.lang.Comparable

Representation of a result to be displayed in an ExpressionColumn. This class is the type of the results displayed in that column.

Author:
Andrew Leppard
See Also:
AbstractTable, AbstractTableModel, EODQuoteModel, ExpressionColumn

Field Summary
static ExpressionResult EMPTY
          Empty or missing result.
 
Constructor Summary
ExpressionResult(int type, double result)
          Create a new result.
 
Method Summary
 int compareTo(java.lang.Object object)
          Compare this result to another result.
 double getResult()
          Get result value.
 java.lang.String toString()
          Return a string representation of the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final ExpressionResult EMPTY
Empty or missing result.

Constructor Detail

ExpressionResult

public ExpressionResult(int type,
                        double result)
Create a new result.

Parameters:
type - Type of the result, e.g. Expression.BOOLEAN_TYPE
result - Value of result.
Method Detail

getResult

public double getResult()
Get result value.

Returns:
Result value.

toString

public java.lang.String toString()
Return a string representation of the result.

Overrides:
toString in class java.lang.Object
Returns:
String value.

compareTo

public int compareTo(java.lang.Object object)
Compare this result to another result.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
object - Result to compare with.
Returns:
-1if the result is before this result; 0if the results are equal; 1 if the result is after this result.

Venice 0.7beta