Package com.macrofocus.molap.dataframe
Class SelectionDataFrame<R,C,V>
- java.lang.Object
-
- com.macrofocus.molap.dataframe.AbstractDataFrame<R,C,V>
-
- com.macrofocus.molap.dataframe.SelectionDataFrame<R,C,V>
-
- Type Parameters:
R
- the type of row keysC
- the type of column keysV
- the type of values
- All Implemented Interfaces:
DataFrame<R,C,V>
public class SelectionDataFrame<R,C,V> extends AbstractDataFrame<R,C,V>
A row filterable data frame. Only the selected rows will be made visible by this data frame.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.macrofocus.molap.dataframe.AbstractDataFrame
AbstractDataFrame.ColumnSeries
-
-
Constructor Summary
Constructors Constructor Description SelectionDataFrame(AbstractDataFrame<R,C,V> dataFrame, com.macrofocus.selection.MutableSelection<R> filter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<C>
columns()
Returns the column keys.int
getColumnAddress(C c)
Returns the absolute index for the specified column key.java.lang.Class
getColumnClass(C c)
Returns the most specific superclass for all cell values in a columnint
getColumnCount()
Returns the number of columns contained by this data frame.UniqueIndex<C>
getColumnIndex()
Gets the index used to access the columns.C
getColumnKey(int index)
Returns the column key at the specified absolute index.Series<C,?>
getRow(R r)
Returns a series of all the values of a given row.int
getRowAddress(R r)
Returns the absolute index for the specified row key.java.lang.Class
getRowClass(R r)
Returns the most specific superclass for all cell values in a row.int
getRowCount()
Returns the number of rows contained by the this data frame.UniqueIndex<R>
getRowIndex()
Gets the index used to access the rows.R
getRowKey(int index)
Returns the row key at the specified absolute index.V
getValueAt(R r, C c)
Returns the value for the cell at the intersection of thecolumn
key androw
key.DataFrame
join(Series series, C[] cs)
java.lang.Iterable<R>
rows()
Returns the row keys.-
Methods inherited from class com.macrofocus.molap.dataframe.AbstractDataFrame
addDataFrameListener, addWeakDataFrameListener, aggregate, aggregate, append, appendAndReindex, benchmark, filter, getCentroid, getColumn, getColumnName, getConstant, getCount, getCountDistinct, getCountDistinctWithNull, getCube, getDataFrameAggregation, getDistributiveStatistics, getFirst, getFirstQuartile, getMax, getMean, getMedian, getMin, getRandom, getStatistics, getStdDev, getSum, getThirdQuartile, getUnivariateStatistics, getVariance, getVarianceByPopulation, getWeightedMean, getWeightedSum, notifyDataFrameChanged, orderRows, print, print, printSchema, reindexColumns, reindexRows, reindexRows, reindexRows, reindexRows, reindexRows, remapColumns, removeColumns, removeDataFrameListener, removeDataFrameListeners, removeDuplicates
-
-
-
-
Constructor Detail
-
SelectionDataFrame
public SelectionDataFrame(AbstractDataFrame<R,C,V> dataFrame, com.macrofocus.selection.MutableSelection<R> filter)
-
-
Method Detail
-
getRowIndex
public UniqueIndex<R> getRowIndex()
Description copied from interface:DataFrame
Gets the index used to access the rows.- Returns:
- the row index
-
getColumnIndex
public UniqueIndex<C> getColumnIndex()
Description copied from interface:DataFrame
Gets the index used to access the columns.- Returns:
- the column index
-
getRowClass
public java.lang.Class getRowClass(R r)
Description copied from interface:DataFrame
Returns the most specific superclass for all cell values in a row.- Parameters:
r
- the key of the row- Returns:
- the common ancestor class of the object values in the row.
-
getColumnClass
public java.lang.Class getColumnClass(C c)
Description copied from interface:DataFrame
Returns the most specific superclass for all cell values in a column- Parameters:
c
- the key of the column- Returns:
- the common ancestor class of the object values in the column.
-
getValueAt
public V getValueAt(R r, C c)
Description copied from interface:DataFrame
Returns the value for the cell at the intersection of thecolumn
key androw
key.- Parameters:
r
- the row key whose value is to be queriedc
- the column key whose value is to be queried- Returns:
- the value Object at the specified cell
-
getRow
public Series<C,?> getRow(R r)
Description copied from interface:DataFrame
Returns a series of all the values of a given row.- Parameters:
r
- the row key- Returns:
- a Series object
-
rows
public java.lang.Iterable<R> rows()
Description copied from interface:DataFrame
Returns the row keys.
-
columns
public java.lang.Iterable<C> columns()
Description copied from interface:DataFrame
Returns the column keys.
-
getRowKey
public R getRowKey(int index)
Description copied from interface:DataFrame
Returns the row key at the specified absolute index. This is the inverse ofDataFrame.getRowAddress(Object)
.
-
getColumnKey
public C getColumnKey(int index)
Description copied from interface:DataFrame
Returns the column key at the specified absolute index. This is the inverse ofDataFrame.getColumnAddress(Object)
.- Specified by:
getColumnKey
in interfaceDataFrame<R,C,V>
- Overrides:
getColumnKey
in classAbstractDataFrame<R,C,V>
- Parameters:
index
- the index- Returns:
- the column key
-
getRowAddress
public int getRowAddress(R r)
Description copied from interface:DataFrame
Returns the absolute index for the specified row key. This is the inverse ofDataFrame.getRowKey(int)
.- Specified by:
getRowAddress
in interfaceDataFrame<R,C,V>
- Overrides:
getRowAddress
in classAbstractDataFrame<R,C,V>
- Parameters:
r
- the row key- Returns:
- the absolute index of the specified key.
-
getColumnAddress
public int getColumnAddress(C c)
Description copied from interface:DataFrame
Returns the absolute index for the specified column key. This is the inverse ofDataFrame.getColumnKey(int)
.- Specified by:
getColumnAddress
in interfaceDataFrame<R,C,V>
- Overrides:
getColumnAddress
in classAbstractDataFrame<R,C,V>
- Parameters:
c
- the column key- Returns:
- the absolute index of the specified key.
-
getRowCount
public int getRowCount()
Description copied from interface:DataFrame
Returns the number of rows contained by the this data frame.- Specified by:
getRowCount
in interfaceDataFrame<R,C,V>
- Overrides:
getRowCount
in classAbstractDataFrame<R,C,V>
- Returns:
- the number of rows.
-
getColumnCount
public int getColumnCount()
Description copied from interface:DataFrame
Returns the number of columns contained by this data frame.- Specified by:
getColumnCount
in interfaceDataFrame<R,C,V>
- Overrides:
getColumnCount
in classAbstractDataFrame<R,C,V>
- Returns:
- the number of columns.
-
-