public abstract class AbstractDataFrame<R,C,V> extends Object implements DataFrame<R,C,V>
Modifier and Type | Class and Description |
---|---|
class |
AbstractDataFrame.ColumnSeries |
Modifier | Constructor and Description |
---|---|
protected |
AbstractDataFrame() |
Modifier and Type | Method and Description |
---|---|
void |
addDataFrameListener(DataFrameListener<R,C> listener)
Add a listener to the list that's notified each time a change to the data frame occurs.
|
void |
addWeakDataFrameListener(DataFrameListener<R,C> listener)
Add a listener to the list that's notified each time a change to the data frame occurs.
|
AggregateDataFrame<C> |
aggregate(Aggregation... aggregations)
Returns a new data frame suitable for data aggregation.
|
void |
benchmark()
Perform some repetitive operation to estimate the performance of the data frame.
|
Iterable<C> |
columns()
Returns the column keys.
|
FilterDataFrame |
filter(<any> filter)
Returns a new data frame those rows are filtered by the specified filter model.
|
Series<R,V> |
getColumn(C c)
Returns a series of all the values of a given column.
|
int |
getColumnAddress(C c)
Returns the absolute index for the specified column key.
|
int |
getColumnCount()
Returns the number of columns contained by this data frame.
|
C |
getColumnKey(int index)
Returns the column key at the specified absolute index.
|
String |
getColumnName(C column)
Returns the name of the column.
|
CountAggregation |
getCount(C column)
Returns the aggregation method for counting the number of values.
|
CountDistinctAggregation |
getCountDistinct(C column)
Returns the aggregation method for counting the number of distinct values.
|
protected Cube |
getCube() |
MaxAggregation |
getMax(C column)
Returns the aggregation method for finding the maximum value.
|
MeanAggregation |
getMean(C column)
Returns the aggregation method for computing the mean value.
|
MinAggregation |
getMin(C column)
Returns the aggregation method for finding the minimum value.
|
int |
getRowAddress(R r)
Returns the absolute index for the specified row key.
|
int |
getRowCount()
Returns the number of rows contained by the this data frame.
|
R |
getRowKey(int index)
Returns the row key at the specified absolute index.
|
StdDevAggregation |
getStdDev(C column)
Returns the aggregation method for computing the standard deviation.
|
SumAggregation |
getSum(C column)
Returns the aggregation method for computing the sum.
|
VarianceAggregation |
getVariance(C column)
Returns the aggregation method for computing the variance.
|
VarianceAggregation |
getVariance(C column,
C population)
Returns the aggregation method for computing the variance by factoring in the specified population.
|
protected void |
notifyDataFrameChanged(DataFrameEvent<R,C> event)
Fires an event event to listeners that have been registered to track changes to the data frame.
|
DataFrame<R,C,V> |
orderRows(C... columns)
Returns a new data frame reordered using the values coming from the specified columns.
|
void |
print()
Display the content of the data frame to the console.
|
void |
print(PrintStream out,
String caption,
boolean html)
Display the content of the data frame to the specified output.
|
DataFrame<MultiKey,C,V> |
reindexRows(C... columns)
Returns a new data frame reindexed using the values coming from the specified columns.
|
void |
removeDataFrameListener(DataFrameListener<R,C> listener)
Remove a listener to the list that's notified each time a change to the data frame occurs.
|
void |
removeDataFrameListeners()
Remove all listeners to the list that's notified each time a change to the data frame occurs.
|
Iterable<R> |
rows()
Returns the row keys.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, getColumnClass, getColumnIndex, getRow, getRowClass, getRowIndex, getValueAt, join
public Iterable<C> columns()
DataFrame
public R getRowKey(int index)
DataFrame
DataFrame.getRowAddress(Object)
.public C getColumnKey(int index)
DataFrame
DataFrame.getColumnAddress(Object)
.getColumnKey
in interface DataFrame<R,C,V>
index
- the indexpublic int getRowAddress(R r)
DataFrame
DataFrame.getRowKey(int)
.getRowAddress
in interface DataFrame<R,C,V>
r
- the row keypublic int getColumnAddress(C c)
DataFrame
DataFrame.getColumnKey(int)
.getColumnAddress
in interface DataFrame<R,C,V>
c
- the column keypublic int getRowCount()
DataFrame
getRowCount
in interface DataFrame<R,C,V>
public int getColumnCount()
DataFrame
getColumnCount
in interface DataFrame<R,C,V>
public Series<R,V> getColumn(C c)
DataFrame
public DataFrame<R,C,V> orderRows(C... columns)
DataFrame
public FilterDataFrame filter(<any> filter)
DataFrame
protected Cube getCube()
public AggregateDataFrame<C> aggregate(Aggregation... aggregations)
DataFrame
AggregateDataFrame
.public SumAggregation getSum(C column)
DataFrame
public CountAggregation getCount(C column)
DataFrame
public MinAggregation getMin(C column)
DataFrame
public MaxAggregation getMax(C column)
DataFrame
public MeanAggregation getMean(C column)
DataFrame
public VarianceAggregation getVariance(C column)
DataFrame
getVariance
in interface DataFrame<R,C,V>
column
- the column keypublic VarianceAggregation getVariance(C column, C population)
DataFrame
getVariance
in interface DataFrame<R,C,V>
column
- the column keypopulation
- the key of the column for the populationpublic StdDevAggregation getStdDev(C column)
DataFrame
public CountDistinctAggregation getCountDistinct(C column)
DataFrame
getCountDistinct
in interface DataFrame<R,C,V>
column
- the column keypublic String getColumnName(C column)
DataFrame
getColumnName
in interface DataFrame<R,C,V>
column
- the key of the columnpublic void print()
DataFrame
public void print(PrintStream out, String caption, boolean html)
DataFrame
public void benchmark()
DataFrame
public DataFrame<MultiKey,C,V> reindexRows(C... columns)
DataFrame
reindexRows
in interface DataFrame<R,C,V>
columns
- the columns to use for the label valuespublic void addDataFrameListener(DataFrameListener<R,C> listener)
DataFrame
addDataFrameListener
in interface DataFrame<R,C,V>
listener
- the DataFrameListenerpublic void addWeakDataFrameListener(DataFrameListener<R,C> listener)
DataFrame
addWeakDataFrameListener
in interface DataFrame<R,C,V>
listener
- the DataFrameListenerpublic void removeDataFrameListener(DataFrameListener<R,C> listener)
DataFrame
removeDataFrameListener
in interface DataFrame<R,C,V>
listener
- the DataFrameListenerpublic void removeDataFrameListeners()
DataFrame
removeDataFrameListeners
in interface DataFrame<R,C,V>
protected void notifyDataFrameChanged(DataFrameEvent<R,C> event)
event
- the event describing the changesCopyright © 2014 Macrofocus GmbH. All Rights Reserved.