|
Venice 0.7beta | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mov.ui.Column
org.mov.ui.ExpressionColumn
public class ExpressionColumn
Representation of an expression column in a table. An expression column is a
column in quote tables that displays the results of a user expression applied to
the data in the table. The data type of the data displayed in the column will
be ExpressionResult.
AbstractTable,
AbstractTableModel,
EODQuoteModel,
ExpressionResult| Field Summary |
|---|
| Fields inherited from class org.mov.ui.Column |
|---|
ALWAYS_HIDDEN, HIDDEN, VISIBLE |
| Constructor Summary | |
|---|---|
ExpressionColumn(int number,
java.lang.String fullName,
java.lang.String shortName,
int visible,
java.lang.String expressionText,
Expression expression)
Create a new expression column. |
|
| Method Summary | |
|---|---|
void |
calculate(QuoteBundle quoteBundle,
java.util.List quotes)
Execute the expression and calculate the result for each quote. |
java.lang.Object |
clone()
Clone this expression column. |
Expression |
getExpression()
Get the compiled expression. |
java.lang.String |
getExpressionText()
Return the text version of the expression. |
ExpressionResult |
getResult(Symbol symbol,
TradingDate date)
Return the result of the expression for the given symbol on the given date. |
void |
setExpression(Expression expression)
Set the compiled expression. |
void |
setExpressionText(java.lang.String expressionText)
Set the text version of the expression. |
| Methods inherited from class org.mov.ui.Column |
|---|
getFullName, getNumber, getShortName, getType, getVisible, setFullName, setShortName |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExpressionColumn(int number,
java.lang.String fullName,
java.lang.String shortName,
int visible,
java.lang.String expressionText,
Expression expression)
number - The column numberfullName - The full name of the column which appears in menus etc.shortName - The short name of the column which appears in the table header.visible - Either Column.HIDDEN, Column.VISIBLE or
Column.ALWAYS_HIDDEN.expressionText - Text of expression.expression - Compiled expression.| Method Detail |
|---|
public java.lang.String getExpressionText()
public void setExpressionText(java.lang.String expressionText)
expressionText - New expression text.public Expression getExpression()
public void setExpression(Expression expression)
expression - Compiled expression.
public void calculate(QuoteBundle quoteBundle,
java.util.List quotes)
throws EvaluationException
quoteBundle - Quote Bundle containing quotesquotes - A list of Quotes which contain the symbols and dates to
evaluate. A result will be calculated for each quote in the list.
EvaluationException - If there was an error evaluating an expression, such
as divide by zero.Quote
public ExpressionResult getResult(Symbol symbol,
TradingDate date)
symbol - Query the result for this symbol.date - Query the result for this date.
ExpressionResult.EMPTY if there is
currently no result for the given symbol and date.public java.lang.Object clone()
clone in class java.lang.Object
|
Venice 0.7beta | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||