|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.data.column.ColumnMetadata
public class ColumnMetadata
ColumnMetadata stores computed metadata and statistics for a singe column
instance. They are created automatically by Table instances and are
retrieved using the Table.getMetadata(String)
method.
Constructor Summary | |
---|---|
ColumnMetadata(Table table,
java.lang.String column)
Creates a new ColumnMetadata instance. |
|
ColumnMetadata(Table table,
java.lang.String column,
java.util.Comparator cmp,
boolean dynamic)
Creates a new ColumnMetadata instance. |
Method Summary | |
---|---|
void |
calculateValues()
Re-calculates all the metadata and statistics maintained by this object. |
void |
columnChanged(Column src,
int idx,
boolean prev)
Notification that a data column has changed. |
void |
columnChanged(Column src,
int idx,
double prev)
Notification that a data column has changed. |
void |
columnChanged(Column src,
int idx,
float prev)
Notification that a data column has changed. |
void |
columnChanged(Column src,
int idx,
int prev)
Notification that a data column has changed. |
void |
columnChanged(Column src,
int type,
int start,
int end)
Notification that a data column has changed. |
void |
columnChanged(Column src,
int idx,
long prev)
Notification that a data column has changed. |
void |
columnChanged(Column src,
int idx,
java.lang.Object prev)
Notification that a data column has changed. |
void |
dispose()
Dispose of this metadata, freeing any resources and unregistering any listeners. |
java.util.Comparator |
getComparator()
Returns the comparator used to determine column values' sort order. |
java.lang.Object |
getDefaultValue()
Get the columns' default value. |
double |
getDeviation()
Get the standard deviation of numeric values in the column. |
int |
getMaximumRow()
Get the row index of the maximum column value. |
double |
getMean()
Get the mean value of numeric values in the column. |
int |
getMedianRow()
Get the row index of the median column value. |
int |
getMinimumRow()
Get the row index of the minimum column value. |
java.lang.Object[] |
getOrdinalArray()
Get an array of all unique column values, in sorted order. |
java.util.Map |
getOrdinalMap()
Get a map between all unique column values and their integer index in the sort order of those values. |
double |
getSum()
Get the sum of numeric values in the column. |
int |
getUniqueCount()
Get the number of unique values in the column. |
void |
setComparator(java.util.Comparator c)
Sets the comparator used to detemine column values' sort order. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColumnMetadata(Table table, java.lang.String column)
table
- the backing tablecolumn
- the name of the column to store metadata forpublic ColumnMetadata(Table table, java.lang.String column, java.util.Comparator cmp, boolean dynamic)
table
- the backing tablecolumn
- the name of the column to store metadata forcmp
- a Comparator that determines the default sort order for
values in the columndynamic
- indicates if this ColumnMetadata should react to
changes in the underlying table values. If true, computed values
stored in this metadata object will be invalidated when updates to
the column data occur.Method Detail |
---|
public void dispose()
public void calculateValues()
public java.util.Comparator getComparator()
public void setComparator(java.util.Comparator c)
c
- the Comparator to usepublic java.lang.Object getDefaultValue()
public int getMinimumRow()
public int getMaximumRow()
public int getMedianRow()
public int getUniqueCount()
public double getMean()
public double getDeviation()
public double getSum()
public java.lang.Object[] getOrdinalArray()
public java.util.Map getOrdinalMap()
public void columnChanged(Column src, int type, int start, int end)
ColumnListener
columnChanged
in interface ColumnListener
src
- the column that has changedtype
- One of EventConstants.INSERT
,
EventConstants.DELETE
, or EventConstants.UPDATE
.start
- the first column index that has been changedend
- the last column index that has been changedColumnListener.columnChanged(prefuse.data.column.Column, int, int, int)
public void columnChanged(Column src, int idx, boolean prev)
ColumnListener
columnChanged
in interface ColumnListener
src
- the column that has changedidx
- the column row index that has changedprev
- the previous value at the given locationColumnListener.columnChanged(prefuse.data.column.Column, int, boolean)
public void columnChanged(Column src, int idx, double prev)
ColumnListener
columnChanged
in interface ColumnListener
src
- the column that has changedidx
- the column row index that has changedprev
- the previous value at the given locationColumnListener.columnChanged(prefuse.data.column.Column, int, double)
public void columnChanged(Column src, int idx, float prev)
ColumnListener
columnChanged
in interface ColumnListener
src
- the column that has changedidx
- the column row index that has changedprev
- the previous value at the given locationColumnListener.columnChanged(prefuse.data.column.Column, int, float)
public void columnChanged(Column src, int idx, int prev)
ColumnListener
columnChanged
in interface ColumnListener
src
- the column that has changedidx
- the column row index that has changedprev
- the previous value at the given locationColumnListener.columnChanged(prefuse.data.column.Column, int, int)
public void columnChanged(Column src, int idx, long prev)
ColumnListener
columnChanged
in interface ColumnListener
src
- the column that has changedidx
- the column row index that has changedprev
- the previous value at the given locationColumnListener.columnChanged(prefuse.data.column.Column, int, long)
public void columnChanged(Column src, int idx, java.lang.Object prev)
ColumnListener
columnChanged
in interface ColumnListener
src
- the column that has changedidx
- the column row index that has changedprev
- the previous value at the given locationColumnListener.columnChanged(prefuse.data.column.Column, int, java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |