|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISortableData
Abstraction for sortable/comparable data. Implementations of this interface
can be used with SortableDataUtils
to supports basic algorithms, such
as sorting and binary search on any data which can be mapped to a random
access list. The main benefit of this interface is that the type of data is
operated on must not be known (or be a concrete type), thus it can also be
used to sort data spread over multiple lists or arrays.
Method Summary | |
---|---|
boolean |
isLess(int i,
int j)
Returns whether the element stored at index i is smaller
than the one stored at j . |
int |
size()
Returns the number of elements. |
void |
swap(int i,
int j)
Swaps the elements at the given indices. |
Method Detail |
---|
int size()
boolean isLess(int i, int j)
i
is smaller
than the one stored at j
.
void swap(int i, int j)
|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |