|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mckoi.database.SelectableScheme
com.mckoi.database.BlindSearch
public final class BlindSearch
This is a scheme that performs a blind search of a given set. It records no information about how a set element relates to the rest. It blindly searches through the set to find elements that match the given criteria.
This scheme performs badly on large sets because it requires that the database is queried often for information. However since it records no information about the set, memory requirements are non-existant.
This scheme should not be used for anything other than small domain sets because the performance suffers very badly with larger sets. It is ideal for small domain sets because of its no memory overhead. For any select operation this algorithm must check every element in the set.
Field Summary |
---|
Fields inherited from class com.mckoi.database.SelectableScheme |
---|
EMPTY_LIST, ONE_LIST |
Constructor Summary | |
---|---|
BlindSearch(TableDataSource table,
int column)
The Constructor. |
Method Summary | |
---|---|
SelectableScheme |
copy(TableDataSource table,
boolean immutable)
Returns an exact copy of this scheme including any optimization information. |
void |
dispose()
Disposes and invalidates the BlindSearch. |
void |
insert(int row)
This scheme doesn't take any notice of insertions or removals. |
void |
readFrom(java.io.InputStream in)
Reads the entire state of the scheme from the input stream. |
void |
remove(int row)
This scheme doesn't take any notice of insertions or removals. |
IntegerVector |
selectAll()
These are the select operations that are the main purpose of the scheme. |
IntegerVector |
selectRange(SelectableRange range)
Selects the given range of values from this index. |
IntegerVector |
selectRange(SelectableRange[] ranges)
Selects a set of ranges from this index. |
void |
writeTo(java.io.OutputStream out)
Writes the entire state of the scheme to the output stream. |
Methods inherited from class com.mckoi.database.SelectableScheme |
---|
Debug, getCellContents, getColumn, getSubsetScheme, getSystem, getTable, internalOrderIndexSet, isImmutable, selectAllNonNull, selectBetween, selectEqual, selectFirst, selectGreater, selectGreaterOrEqual, selectLast, selectLess, selectLessOrEqual, selectNotEqual, selectNotFirst, selectNotLast, setImmutable, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BlindSearch(TableDataSource table, int column)
Method Detail |
---|
public void insert(int row)
public void remove(int row)
public void readFrom(java.io.InputStream in) throws java.io.IOException
readFrom
in class SelectableScheme
java.io.IOException
public void writeTo(java.io.OutputStream out) throws java.io.IOException
writeTo
in class SelectableScheme
java.io.IOException
public SelectableScheme copy(TableDataSource table, boolean immutable)
copy
in class SelectableScheme
public void dispose()
dispose
in class SelectableScheme
public IntegerVector selectAll()
SelectableScheme
selectAll
in class SelectableScheme
public IntegerVector selectRange(SelectableRange range)
SelectableScheme
This must guarentee that the returned set is sorted from lowest to highest value.
public IntegerVector selectRange(SelectableRange[] ranges)
SelectableScheme
If the above rules are enforced (as they must be) then this method will return a set that is sorted from lowest to highest value.
This must guarentee that the returned set is sorted from lowest to highest value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |