|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsimtools.data.ValueProvider
simtools.data.DataSource
jsynoptic.data.ExpressionDataSource
public class ExpressionDataSource
A data source that evaluate a mathematical expression on other sources to compute its values
| Field Summary | |
|---|---|
protected static java.lang.String |
EXPRESSION_DATA_SOURCE_MARKER
|
protected DataInfo |
info
|
protected double |
max
|
protected long |
maxIndex
|
protected double |
min
min max values if computed |
protected long |
minIndex
|
protected boolean |
minmaxOk
|
protected ExpressionNode |
rootNode
|
protected java.util.Set |
variables
|
| Fields inherited from class simtools.data.DataSource |
|---|
endNotificationListeners, listeners, sortedOrder |
| Fields inherited from class simtools.data.ValueProvider |
|---|
ByteProvider, DoubleProvider, FloatProvider, IntegerProvider, kind, LongProvider, ObjectProvider, ShortProvider |
| Constructor Summary | |
|---|---|
ExpressionDataSource(DataInfo di,
ExpressionNode rootNode)
|
|
| Method Summary | |
|---|---|
void |
changeExpression(java.lang.String exp,
ExpressionNode node)
|
void |
cleanup()
Remove the listeners |
long |
computeLastIndex()
|
java.lang.Object |
computeMax()
|
java.lang.Object |
computeMin()
Force the computation if possible. |
protected void |
computeMinMax()
|
long |
computeStartIndex()
|
void |
DataSourceIndexRangeChanged(DataSource ds,
long startIndex,
long lastIndex)
Called when the range of valid index changed |
void |
DataSourceInfoChanged(DataSource ds,
DataInfo newInfo)
Called when the information about the data source changed |
void |
DataSourceOrderChanged(DataSource ds,
int newOrder)
If defined, called when the order of the source changed. |
void |
DataSourceReplaced(DataSource oldData,
DataSource newData)
Called when a data source is replaced by another one |
void |
DataSourceValueChanged(DataSource ds,
long minIndex,
long maxIndex)
Called when at least a value changed in the data source. |
void |
DataSourceValueRangeChanged(DataSource ds)
Called when the range of possible values changed, if defined. |
java.lang.String |
getDataSourceInformationClass()
This method provide the UI Data source information class name. |
DataInfo |
getInformation()
|
long |
getLastIndex()
|
java.lang.Object |
getMax()
|
java.lang.Object |
getMin()
Return values if possibly only, without expensive computations. |
DataSource[] |
getSourceDependencies()
Returns an array of dependant data sources when serializing. |
long |
getStartIndex()
|
java.lang.Object |
getValue(long index)
|
java.util.Set |
getVariables()
|
boolean |
isComparable()
Check if the values are comparable with each other. |
java.lang.String |
toString()
|
| Methods inherited from class simtools.data.ValueProvider |
|---|
getByteValue, getDoubleValue, getFloatValue, getIntegerValue, getKind, getLongValue, getObjectValue, getShortValue, valueClass |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ExpressionNode rootNode
protected java.util.Set variables
protected DataInfo info
protected long minIndex
protected long maxIndex
protected double min
protected double max
protected boolean minmaxOk
protected static java.lang.String EXPRESSION_DATA_SOURCE_MARKER
| Constructor Detail |
|---|
public ExpressionDataSource(DataInfo di,
ExpressionNode rootNode)
| Method Detail |
|---|
public java.util.Set getVariables()
public DataInfo getInformation()
getInformation in class DataSource
public java.lang.Object computeMin()
throws UnsupportedOperation
DataSource
computeMin in class DataSourceUnsupportedOperation
public java.lang.Object computeMax()
throws UnsupportedOperation
computeMax in class DataSourceUnsupportedOperation
public java.lang.Object getMin()
throws UnsupportedOperation
DataSource
getMin in class DataSourceUnsupportedOperation
public java.lang.Object getMax()
throws UnsupportedOperation
getMax in class DataSourceUnsupportedOperation
protected void computeMinMax()
throws UnsupportedOperation
UnsupportedOperation
public void changeExpression(java.lang.String exp,
ExpressionNode node)
exp - node - public void cleanup()
public java.lang.Object getValue(long index)
throws DataException
getValue in class ValueProviderDataException
public void DataSourceValueChanged(DataSource ds,
long minIndex,
long maxIndex)
DataSourceListener
DataSourceValueChanged in interface DataSourceListenerds - The data source that changedminIndex - Lower bound of the range where values changedmaxIndex - Higher bound of the range where values changed
public void DataSourceIndexRangeChanged(DataSource ds,
long startIndex,
long lastIndex)
DataSourceListener
DataSourceIndexRangeChanged in interface DataSourceListenerds - The data source that changedstartIndex - The new start IndexlastIndex - The new last index
public void DataSourceInfoChanged(DataSource ds,
DataInfo newInfo)
DataSourceListener
DataSourceInfoChanged in interface DataSourceListenerds - The data source that changedpublic void DataSourceValueRangeChanged(DataSource ds)
DataSourceListener
DataSourceValueRangeChanged in interface DataSourceListenerds - The data source that changed
public void DataSourceOrderChanged(DataSource ds,
int newOrder)
DataSourceListener
DataSourceOrderChanged in interface DataSourceListenerds - The data source that changed
public void DataSourceReplaced(DataSource oldData,
DataSource newData)
DataSourceListener
DataSourceReplaced in interface DataSourceListener
public long computeLastIndex()
throws UnsupportedOperation
computeLastIndex in class DataSourceUnsupportedOperation
public long computeStartIndex()
throws UnsupportedOperation
computeStartIndex in class DataSourceUnsupportedOperation
public long getLastIndex()
throws UnsupportedOperation
getLastIndex in class DataSourceUnsupportedOperation
public long getStartIndex()
throws UnsupportedOperation
getStartIndex in class DataSourceUnsupportedOperationpublic boolean isComparable()
DataSource
isComparable in class DataSourcepublic java.lang.String toString()
toString in class java.lang.Objectpublic DataSource[] getSourceDependencies()
DataSource
getSourceDependencies in class DataSourcepublic java.lang.String getDataSourceInformationClass()
DataSource
getDataSourceInformationClass in class DataSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||