Venice 0.751beta

nz.org.venice.ui
Class QuoteFormat

java.lang.Object
  extended bynz.org.venice.ui.QuoteFormat
All Implemented Interfaces:
java.lang.Comparable

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

Representation of a quote value for display in a table. This class is used by the AbstractTable class to identify the value type so that it can render the value correctly. A quote value might be the day open, day close, day high etc of the quote.

Author:
Andrew Leppard

Constructor Summary
QuoteFormat(double quote)
          Create a new quote value format object.
 
Method Summary
 int compareTo(java.lang.Object object)
          Compare two quote values.
 double getQuote()
          Return the quote value.
static java.lang.String quoteToString(double quote)
          Convert from a quote (in dollars) to string.
 java.lang.String toString()
          Create a string representation of the quote value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuoteFormat

public QuoteFormat(double quote)
Create a new quote value format object.

Parameters:
quote - the quote value.
Method Detail

quoteToString

public static java.lang.String quoteToString(double quote)
Convert from a quote (in dollars) to string.

Parameters:
quote - the quote
Returns:
the quote string

toString

public java.lang.String toString()
Create a string representation of the quote value.

Returns:
string representation of the quote value.

getQuote

public double getQuote()
Return the quote value.

Returns:
the quote value.

compareTo

public int compareTo(java.lang.Object object)
Compare two quote values.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
object - object to compare to
Returns:
the value 0 if the objects are equal; 1 if this object is after the specified object or -1 if this object is before the specified object

Venice 0.751beta