The binary Java SequenceIterator methods produce a result sequence of the same type by applying the specified operation on the object's sequence and the corresponding elements in the input sequence.
The operation can be one of the following:
SequenceIterator add( SequenceIterator other) Return the sequence of the sum of the corresponding elements in the object and other sequences
SequenceIterator sub( SequenceIterator other) Return the sequence of the difference of the corresponding elements in the object and other sequences SequenceIterator mul( SequenceIterator other) Return the sequence of the product of the corresponding elements in the object and other sequences SequenceIterator div( SequenceIterator other) Return the sequence of the division of the corresponding elements in the object and other sequences SequenceIterator mod( SequenceIterator other) Return the sequence of the modulo of the corresponding elements in the object and other sequences SequenceIterator max( SequenceIterator other) Return the sequence of the maximum of the corresponding elements in the object and other sequences SequenceIterator min( SequenceIterator other) Return the sequence of the minimum of the corresponding elements in the object and other sequences Example
Following is an example code snippet demonstrating a binary method:
Cursor<Quote> cursor = new Cursor<Quote>(con, Quote.class, "symbol"); for (Quote quote : cursor) { ... SequenceIterator high = quote.high.iterator(); SequenceIterator low = quote.low.iterator(); SequenceIterator diff; ... diff = high.sub(low); ... }