Class TransformOneToManyIterable<I,​O>

  • Type Parameters:
    I - The input iterable type.
    O - the output iterable type.
    All Implemented Interfaces:
    Closeable, AutoCloseable, Iterable<O>

    public abstract class TransformOneToManyIterable<I,​O>
    extends Object
    implements Closeable, Iterable<O>
    A TransformToMultiIterable allows Iterables to be lazily validated and transformed without loading the entire iterable into memory. The easiest way to use this class is to create an anonymous inner class. This class is very similar to TransformOneToManyIterable except that this class transforms one to many items.
    • Constructor Detail

      • TransformOneToManyIterable

        public TransformOneToManyIterable​(Iterable<? extends I> input)
        Constructs an TransformOneToManyIterable with the given input Iterable and no validation.
        Parameters:
        input - the input Iterable
      • TransformOneToManyIterable

        public TransformOneToManyIterable​(Iterable<? extends I> input,
                                          Validator<I> validator,
                                          boolean skipInvalid)
        Constructs an TransformOneToManyIterable with the given input Iterable, Validator and a skipInvalid flag to determine whether invalid items should be skipped.
        Parameters:
        input - the input Iterable
        validator - the Validator
        skipInvalid - if true invalid items should be skipped
      • TransformOneToManyIterable

        public TransformOneToManyIterable​(Iterable<? extends I> input,
                                          Validator<I> validator,
                                          boolean skipInvalid,
                                          boolean autoClose)
        Constructs an TransformOneToManyIterable with the given inputs
        Parameters:
        input - the input Iterable
        validator - the Validator
        skipInvalid - if true invalid items should be skipped
        autoClose - if true then the input iterable will be closed when any iterators reach the end.