The top Java SequenceIterator methods take an integer argument
n
and produce result sequences of the topn
maximum or minimum elements or their positions:
SequenceIterator topMax(int top) Return the top n
maximum values in the object's sequenceSequenceIterator topMin(int top) Return the top
n
minimum values in the object's sequenceSequenceIterator topPosMax(int top) Return the positions of the top
n
maximum values in the object's sequenceSequenceIterator topPosMin(int top) Return the positions of the top
n
minimum values in the object's sequenceExample
Following is an example code snippet demonstrating one of these functions:
SequenceIterator close = quote.close.iterator(); SequenceIterator top10 = close.topMax(10); ...