Comparison Java SequenceIterator Methods

The comparison Java SequenceIterator methods take an input sequence argument and produce the boolean result sequence by applying the specified comparison operator to corresponding elements of the object's sequence and the input sequence.

If the two input sequence arguments are of different lengths, the operation is 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 true for corresponding elements that are equal in the input sequence; otherwise, it is false.
SequenceIterator ne(SequenceIterator input)
The element of the result sequence is true for corresponding elements that are not equal in the input sequence; otherwise, it is false.
SequenceIterator gt(SequenceIterator input)
The element of the result sequence is true for corresponding elements where the object's element is greater than the input; otherwise, it is false.
SequenceIterator ge(SequenceIterator input)
The element of the result sequence is true for corresponding elements where the object's element is greater than or equal to the input; otherwise, it is false.
SequenceIterator lt(SequenceIterator input)
The element of the result sequence is true for corresponding elements where the object's element is less than the input; otherwise, it is false.
SequenceIterator le(SequenceIterator input)
The element of the result sequence is true for corresponding elements where the object's element is less than or equal to the input; otherwise, it is false.

Example

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);

        ...
    }