|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--upr.u7.ExternalSort
Simple External Sort, uses MergeSort with two scratch files and a buffer.
Field Summary | |
static int |
DEFAULT_BUFFER_SIZE
|
Constructor Summary | |
ExternalSort()
Default Constructor |
|
ExternalSort(int bufferSize)
Constructs an object that sorts files of Item objects, with given 'bufferSize' - the size of each section (buffer) used in the external sorting. |
Method Summary | |
void |
sort(java.lang.String fname,
java.util.Comparator c)
Sorts the file 'fname' of objects of class Item using the given comparator |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int DEFAULT_BUFFER_SIZE
Constructor Detail |
public ExternalSort()
public ExternalSort(int bufferSize)
Method Detail |
public void sort(java.lang.String fname, java.util.Comparator c)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |