Top Java SequenceIterator Methods

The top Java SequenceIterator methods take an integer argument n and produce result sequences of the top n maximum or minimum elements or their positions:

SequenceIterator topMax(int top) Return the top n maximum values in the object's sequence
SequenceIterator topMin(int top)

Return the top n minimum values in the object's sequence

SequenceIterator topPosMax(int top)

Return the positions of the top n maximum values in the object's sequence

SequenceIterator topPosMin(int top)

Return the positions of the top n minimum values in the object's sequence

Example

Following is an example code snippet demonstrating one of these functions:

     
        SequenceIterator close = quote.close.iterator();
        SequenceIterator top10 = close.topMax(10);
        ...