ChainsCombinator

public class ChainsCombinator<T extends Comparable<T>, V>

Given a primary and a secondary chain, it mutates the primary chain by combining the respective values in the given order

  Primary    Secondary       Result (Updated Primary)
    1                          1
    |                          |
    2            2             2
    |            |             |
    4            3             3
    |            |             |
    .            4             4
    .                          .
    .                          .
                               .
Note: the iterator doesn't deal with duplicates in the output, it just returns the elements to be evaluated. This is a deliberate design decision to keep SRP (it just iterates), but, depending on feedbacks, this can be changed.

Author

Ennio Visconti

Constructors

Link copied to clipboard
public void ChainsCombinator(@NotNull() @NotNull() TimeChain<T, V> primaryChain, @NotNull() @NotNull() TimeChain<T, V> secondaryChain)

Functions

Link copied to clipboard
public void forEach(BiConsumer<Sample<T, V>, Sample<T, V>> operation)