Package org.dmfs.jems2.iterable
Class Diff<Left,Right>
- java.lang.Object
-
- org.dmfs.jems2.iterable.Diff<Left,Right>
-
public final class Diff<Left,Right> extends java.lang.Object implements java.lang.Iterable<Pair<Optional<Left>,Optional<Right>>>
AnIterableof the differences of two givenIterables.Note, to get correct results, the
Iterables must be sorted by the comparison criterion.Example
Diff([1,3,5,7], [3,4,5], Integer::compareTo) -> [ (1, -), (3, 3), (-, 4), (5, 5), (7, -) ]
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<Pair<Optional<Left>,Optional<Right>>>iterator()
-
-
-
Constructor Detail
-
Diff
public Diff(java.lang.Iterable<Left> lefts, java.lang.Iterable<Right> rights, BiFunction<? super Left,? super Right,java.lang.Integer> comparatorFunction)
-
-