| prefuse.data.util.Index
All known Subclasses: prefuse.data.util.TreeIndex,
Index | public interface Index (Code) | | Represents an index over a column of data, allowing quick lookups by
data value and providing iterators over sorted ranges of data. For
convenience, there are index lookup methods for a variety of data
types; which ones to use depend on the data type of the column
being indexed and calling a lookup method for an incompatible
data type could lead to an exception being thrown.
author: jeffrey heer |
Field Summary | |
final public static int | TYPE_AEE Composite flag for an ascending, left and right exclusive range. | final public static int | TYPE_AEI Composite flag for an ascending, left exclusive, right inclusive
range. | final public static int | TYPE_AIE Composite flag for an ascending, left inclusive, right exclusive
range. | final public static int | TYPE_AII Composite flag for an ascending, left and right inclusive range. | final public static int | TYPE_ASCENDING Flag for an ascending sort order. | final public static int | TYPE_DEE Composite flag for a descending, left and right exclusive range. | final public static int | TYPE_DEI Composite flag for a descending, left exclusive, right inclusive
range. | final public static int | TYPE_DESCENDING Flag for a descending sort order. | final public static int | TYPE_DIE Composite flag for a descending, left inclusive, right exclusive
range. | final public static int | TYPE_DII Composite flag for a descending, left and right inclusive range. | final public static int | TYPE_LEFT_EXCLUSIVE Flag for excluding the lowest value of a range. | final public static int | TYPE_LEFT_INCLUSIVE Flag for including the lowest value of a range. | final public static int | TYPE_RIGHT_EXCLUSIVE Flag for excluding the highest value of a range. | final public static int | TYPE_RIGHT_INCLUSIVE Flag for including the highest value of a range. |
Method Summary | |
public IntIterator | allRows(int type) Get an iterator over all rows in the index, in sorted order.
Parameters: type - the sort type, one of Index.TYPE_ASCENDING orIndex.TYPE_DESCENDING. | public void | dispose() Dispose of an index, deregistering all listeners. | public int | get(Object x) Get the first row found with the given data value. | public int | get(int x) Get the first row found with the given data value. | public int | get(long x) Get the first row found with the given data value. | public int | get(float x) Get the first row found with the given data value. | public int | get(double x) Get the first row found with the given data value. | public Comparator | getComparator() Get the comparator used to compare column data values. | public void | index() Perform an initial indexing of a data column. | public int | maximum() Get the row (or one of the rows) with the maximum data value. | public int | median() Get the row (or one of the rows) with the median data value. | public int | minimum() Get the row (or one of the rows) with the minimum data value. | public IntIterator | rows(Object lo, Object hi, int type) Get an iterator over a sorted range of rows. | public IntIterator | rows(int lo, int hi, int type) Get an iterator over a sorted range of rows. | public IntIterator | rows(long lo, long hi, int type) Get an iterator over a sorted range of rows. | public IntIterator | rows(float lo, float hi, int type) Get an iterator over a sorted range of rows. | public IntIterator | rows(double lo, double hi, int type) Get an iterator over a sorted range of rows. | public IntIterator | rows(Object val) Get an iterator over all rows with the given data value. | public IntIterator | rows(int val) Get an iterator over all rows with the given data value. | public IntIterator | rows(long val) Get an iterator over all rows with the given data value. | public IntIterator | rows(float val) Get an iterator over all rows with the given data value. | public IntIterator | rows(double val) Get an iterator over all rows with the given data value. | public IntIterator | rows(boolean val) Get an iterator over all rows with the given data value. | public int | size() Get the size of this index, the number of data value / row
pairs included. | public int | uniqueCount() Get the number of unique data values in the index. |
TYPE_AEE | final public static int TYPE_AEE(Code) | | Composite flag for an ascending, left and right exclusive range.
|
TYPE_AEI | final public static int TYPE_AEI(Code) | | Composite flag for an ascending, left exclusive, right inclusive
range.
|
TYPE_AIE | final public static int TYPE_AIE(Code) | | Composite flag for an ascending, left inclusive, right exclusive
range.
|
TYPE_AII | final public static int TYPE_AII(Code) | | Composite flag for an ascending, left and right inclusive range.
|
TYPE_ASCENDING | final public static int TYPE_ASCENDING(Code) | | Flag for an ascending sort order.
|
TYPE_DEE | final public static int TYPE_DEE(Code) | | Composite flag for a descending, left and right exclusive range.
|
TYPE_DEI | final public static int TYPE_DEI(Code) | | Composite flag for a descending, left exclusive, right inclusive
range.
|
TYPE_DESCENDING | final public static int TYPE_DESCENDING(Code) | | Flag for a descending sort order.
|
TYPE_DIE | final public static int TYPE_DIE(Code) | | Composite flag for a descending, left inclusive, right exclusive
range.
|
TYPE_DII | final public static int TYPE_DII(Code) | | Composite flag for a descending, left and right inclusive range.
|
TYPE_LEFT_EXCLUSIVE | final public static int TYPE_LEFT_EXCLUSIVE(Code) | | Flag for excluding the lowest value of a range.
|
TYPE_LEFT_INCLUSIVE | final public static int TYPE_LEFT_INCLUSIVE(Code) | | Flag for including the lowest value of a range.
|
TYPE_RIGHT_EXCLUSIVE | final public static int TYPE_RIGHT_EXCLUSIVE(Code) | | Flag for excluding the highest value of a range.
|
TYPE_RIGHT_INCLUSIVE | final public static int TYPE_RIGHT_INCLUSIVE(Code) | | Flag for including the highest value of a range.
|
dispose | public void dispose()(Code) | | Dispose of an index, deregistering all listeners.
|
get | public int get(Object x)(Code) | | Get the first row found with the given data value.
Parameters: x - the data value the first row matching the data value |
get | public int get(int x)(Code) | | Get the first row found with the given data value.
Parameters: x - the data value the first row matching the data value |
get | public int get(long x)(Code) | | Get the first row found with the given data value.
Parameters: x - the data value the first row matching the data value |
get | public int get(float x)(Code) | | Get the first row found with the given data value.
Parameters: x - the data value the first row matching the data value |
get | public int get(double x)(Code) | | Get the first row found with the given data value.
Parameters: x - the data value the first row matching the data value |
getComparator | public Comparator getComparator()(Code) | | Get the comparator used to compare column data values.
the sort comparator |
index | public void index()(Code) | | Perform an initial indexing of a data column.
|
maximum | public int maximum()(Code) | | Get the row (or one of the rows) with the maximum data value.
a row with a maximum data value |
median | public int median()(Code) | | Get the row (or one of the rows) with the median data value.
a row with a median data value |
minimum | public int minimum()(Code) | | Get the row (or one of the rows) with the minimum data value.
a row with a minimum data value |
rows | public IntIterator rows(Object lo, Object hi, int type)(Code) | | Get an iterator over a sorted range of rows.
Parameters: lo - the minimum data value Parameters: hi - the maximum data value Parameters: type - the iteration type, one of the composite flagsinvolving both a sort order, and whether each bound ofthe range should inclusive or exclusive an iterator over a sorted range of rows |
rows | public IntIterator rows(int lo, int hi, int type)(Code) | | Get an iterator over a sorted range of rows.
Parameters: lo - the minimum data value Parameters: hi - the maximum data value Parameters: type - the iteration type, one of the composite flagsinvolving both a sort order, and whether each bound ofthe range should inclusive or exclusive an iterator over a sorted range of rows |
rows | public IntIterator rows(long lo, long hi, int type)(Code) | | Get an iterator over a sorted range of rows.
Parameters: lo - the minimum data value Parameters: hi - the maximum data value Parameters: type - the iteration type, one of the composite flagsinvolving both a sort order, and whether each bound ofthe range should inclusive or exclusive an iterator over a sorted range of rows |
rows | public IntIterator rows(float lo, float hi, int type)(Code) | | Get an iterator over a sorted range of rows.
Parameters: lo - the minimum data value Parameters: hi - the maximum data value Parameters: type - the iteration type, one of the composite flagsinvolving both a sort order, and whether each bound ofthe range should inclusive or exclusive an iterator over a sorted range of rows |
rows | public IntIterator rows(double lo, double hi, int type)(Code) | | Get an iterator over a sorted range of rows.
Parameters: lo - the minimum data value Parameters: hi - the maximum data value Parameters: type - the iteration type, one of the composite flagsinvolving both a sort order, and whether each bound ofthe range should inclusive or exclusive an iterator over a sorted range of rows |
rows | public IntIterator rows(Object val)(Code) | | Get an iterator over all rows with the given data value.
Parameters: val - the data value an iterator over all rows matching the data value |
rows | public IntIterator rows(int val)(Code) | | Get an iterator over all rows with the given data value.
Parameters: val - the data value an iterator over all rows matching the data value |
rows | public IntIterator rows(long val)(Code) | | Get an iterator over all rows with the given data value.
Parameters: val - the data value an iterator over all rows matching the data value |
rows | public IntIterator rows(float val)(Code) | | Get an iterator over all rows with the given data value.
Parameters: val - the data value an iterator over all rows matching the data value |
rows | public IntIterator rows(double val)(Code) | | Get an iterator over all rows with the given data value.
Parameters: val - the data value an iterator over all rows matching the data value |
rows | public IntIterator rows(boolean val)(Code) | | Get an iterator over all rows with the given data value.
Parameters: val - the data value an iterator over all rows matching the data value |
size | public int size()(Code) | | Get the size of this index, the number of data value / row
pairs included.
the size of the index |
uniqueCount | public int uniqueCount()(Code) | | Get the number of unique data values in the index.
the number of unique data values |
|
|