|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sortTest
Test for generic sort
Classes to sort a specific type are derived from the abstract generic_sort class. This code tests the sort code by creating two specific sort classes: one that sorts arrays of testElem objects by index and one that sorts by the val field.
Inner Class Summary | |
private class |
sortTest.sort_testElem_index
Sort by index |
private class |
sortTest.sort_testElem_val
Sort by value |
private class |
sortTest.testElem
Test data structure: index is the array index and val is the data element. |
Constructor Summary | |
(package private) |
sortTest()
|
Method Summary | |
sortTest.testElem[] |
alloc_array(int size)
|
sortTest.sort_testElem_index |
alloc_sort_testElem_index()
|
sortTest.sort_testElem_val |
alloc_sort_testElem_val()
|
static void |
main(java.lang.String[] args)
|
(package private) void |
printArray(sortTest.testElem[] a)
|
Methods inherited from class java.lang.Object |
|
Constructor Detail |
sortTest()
Method Detail |
public sortTest.sort_testElem_val alloc_sort_testElem_val()
public sortTest.sort_testElem_index alloc_sort_testElem_index()
public sortTest.testElem[] alloc_array(int size)
void printArray(sortTest.testElem[] a)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |