The comparison Java SequenceIterator methods take an input sequence argument, and produce the boolean result sequence by applying the specified comparison operator on the object's sequence and the corresponding elements in the input sequence.
If the two input sequence arguments are of different lengths the operation will be performed on only the number of elements in the shorter of the two sequences.
The operator can be one of the following:
SequenceIterator eq(SequenceIterator (input) The element of the result sequence is truefor corresponding elements that are equal in the input sequence; otherwisefalseSequenceIterator ne(SequenceIterator (input) The element of the result sequence is truefor corresponding elements that are not equal in the input sequence; otherwisefalseSequenceIterator gt(SequenceIterator (input) The element of the result sequence is truefor corresponding elements where the object's element is greater than the input; otherwisefalseSequenceIterator ge(SequenceIterator (input) The element of the result sequence is truefor corresponding elements where the object's element is greater than or equal to the input; otherwisefalseSequenceIterator lt(SequenceIterator (input) The element of the result sequence is truefor corresponding elements where the object's element is less than the input; otherwisefalseSequenceIterator le(SequenceIterator (input) The element of the result sequence is truefor corresponding elements where the object's element is less than or equal to the input; otherwisefalseExample
Following is an example code snippet demonstrating a comparison operator method:
Cursor<Quote> cursor = new Cursor<Quote>(con, Quote.class, "symbol"); for (Quote quote : cursor) { ... SequenceIterator eq = quote.high.eq(quote.close) ...