|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.math.TimeDataGrid<T>
T - the type of Objects that are processed by this gridpublic class TimeDataGrid<T>
provides aggregated data based on a TimeDataParser
TimeDataParser,
TimeDataGraphics| Constructor Summary | |
|---|---|
TimeDataGrid()
|
|
TimeDataGrid(DataMatrix<T> matrix,
int timeAxis,
int groupAxis)
|
|
TimeDataGrid(TimeDataParser<? super T> parser)
|
|
TimeDataGrid(TimeDataParser<? super T> parser,
Filter<? super T> filter)
|
|
| Method Summary | |
|---|---|
void |
addData(Enumeration<? extends T> e)
loads the data by parsing the given Enumeration and extracting the relevant values through the parser |
void |
addData(Enumeration<? extends T> e,
Monitor mon)
min and max from the given Monitor remain untouched; a disabled Monitor will lead to CancellationWarning |
void |
addPoint(Date date,
Object group,
Number n)
|
void |
addPropertyChangeListener(PropertyChangeListener listener)
allows to be notified when new data is loaded or cleared; the property key on the event is 'data' |
HashMap<Object,Map<Date,BigDecimal>> |
aggregateTopMaps(int maxGroups,
DataPoint.ValueType type,
Object remainderKey)
|
TableModel |
asTableModel(String dateHeader,
DataPoint.ValueType type)
generates a TableModel based on the data of this grid; if new data is loaded or the grid is cleared, the model will fire a table structure changed event to its listeners. |
TableModel |
asTableModel(String dateHeader,
DataPoint.ValueType type,
int maxGroups,
String remainderColumn)
generates a TableModel that is based on an aggregated data structure from this grid; otherwise it works just as the non-aggregated TableModel |
void |
clearData()
|
Object |
clone()
|
Vector<TimeDataGrid<? super T>> |
getAdditionalGrids()
access to a list where other grids can be added, so that one Enumeration can run through multiple grids |
DataPoint |
getDataPoint(Date date,
Object group)
|
SortedSet<Date> |
getDates()
provides an unmodifiable view of the data |
HashMap<Date,DataPoint> |
getDatesSum()
generates a new data structure holding the data present at the time of calling |
Filter<? super T> |
getFilter()
|
Map<Date,DataPoint> |
getGroupData(Object group)
provides an unmodifiable view of the data |
Set<Object> |
getGroups()
provides an unmodifiable view of the data |
HashMap<Object,DataPoint> |
getGroupSums()
generates a new data structure holding the data present at the time of calling |
TimeDataParser<? super T> |
getParser()
|
PropertyChangeListener[] |
getPropertyChangeListeners()
|
DataPoint |
getSum(Date date)
|
DataPoint |
getSum(Object groupCriteria)
|
DataPoint |
getTopGroupsSum(int maxEntries)
|
HashMap<Object,Double> |
getTopGroupSums(int maxEntries,
DataPoint.ValueType type,
Object remainderKey)
|
DataPoint |
getTotalSum()
|
protected void |
processElement(T entry)
data is processed here by summing up the relevant number for each date/group pair |
void |
removePropertyChangeListener(PropertyChangeListener listener)
|
void |
setFilter(Filter<? super T> filter)
|
void |
setParser(TimeDataParser<? super T> parser)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimeDataGrid()
public TimeDataGrid(TimeDataParser<? super T> parser)
public TimeDataGrid(TimeDataParser<? super T> parser,
Filter<? super T> filter)
public TimeDataGrid(DataMatrix<T> matrix,
int timeAxis,
int groupAxis)
| Method Detail |
|---|
public Object clone()
clone in class Objectpublic void addPropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
public PropertyChangeListener[] getPropertyChangeListeners()
public TimeDataParser<? super T> getParser()
public void setParser(TimeDataParser<? super T> parser)
public Filter<? super T> getFilter()
public void setFilter(Filter<? super T> filter)
public Vector<TimeDataGrid<? super T>> getAdditionalGrids()
public void clearData()
public void addData(Enumeration<? extends T> e)
public void addData(Enumeration<? extends T> e,
Monitor mon)
throws CancellationWarning
CancellationWarning
CancellationWarningprotected void processElement(T entry)
public void addPoint(Date date,
Object group,
Number n)
public SortedSet<Date> getDates()
public Set<Object> getGroups()
public Map<Date,DataPoint> getGroupData(Object group)
public HashMap<Object,DataPoint> getGroupSums()
public HashMap<Date,DataPoint> getDatesSum()
public DataPoint getDataPoint(Date date,
Object group)
public DataPoint getTotalSum()
public DataPoint getSum(Date date)
public DataPoint getSum(Object groupCriteria)
public DataPoint getTopGroupsSum(int maxEntries)
public HashMap<Object,Double> getTopGroupSums(int maxEntries,
DataPoint.ValueType type,
Object remainderKey)
public HashMap<Object,Map<Date,BigDecimal>> aggregateTopMaps(int maxGroups,
DataPoint.ValueType type,
Object remainderKey)
public TableModel asTableModel(String dateHeader,
DataPoint.ValueType type)
public TableModel asTableModel(String dateHeader,
DataPoint.ValueType type,
int maxGroups,
String remainderColumn)
asTableModel(String, com.antelmann.math.DataPoint.ValueType)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||