Class ConvertedIterableInterval<A,​B>

    • Field Detail

      • converterSupplier

        protected final java.util.function.Supplier<Converter<? super A,​? super B>> converterSupplier
      • convertedSupplier

        protected final java.util.function.Supplier<? extends B> convertedSupplier
    • Constructor Detail

      • ConvertedIterableInterval

        public ConvertedIterableInterval​(IterableInterval<A> source,
                                         java.util.function.Supplier<Converter<? super A,​? super B>> converterSupplier,
                                         java.util.function.Supplier<? extends B> convertedSupplier)
        Parameters:
        source -
        converterSupplier -
        convertedSupplier -
      • ConvertedIterableInterval

        public ConvertedIterableInterval​(IterableInterval<A> source,
                                         Converter<? super A,​? super B> converter,
                                         java.util.function.Supplier<? extends B> convertedSupplier)
        Parameters:
        source -
        converter -
        convertedSupplier -
    • Method Detail

      • cursor

        public ConvertedCursor<A,​B> cursor()
        Description copied from interface: IterableRealInterval

        Returns a RealCursor that iterates with optimal speed without calculating the location at each iteration step. Localization is performed on demand.

        Use this where localization is required rarely/ not for each iteration.

        Returns:
        fast iterating iterator
      • localizingCursor

        public ConvertedCursor<A,​B> localizingCursor()
        Description copied from interface: IterableRealInterval

        Returns a RealLocalizable Iterator that calculates its location at each iteration step. That is, localization is performed with optimal speed.

        Use this where localization is required often/ for each iteration.

        Returns:
        fast localizing iterator
      • getDestinationType

        @Deprecated
        public B getDestinationType()
        Deprecated.
        Returns:
        an instance of the destination Type.
      • getDestinationSupplier

        public java.util.function.Supplier<? extends B> getDestinationSupplier()
        Returns:
        the supplier of conversion destination instances
      • getType

        public B getType()
        Description copied from interface: IterableRealInterval
        Get an instance of T.

        It should not be assumed that the returned T instance is an independent copy. In particular, repeated calls to getType() may return the same instance.

        The default implementation returns IterableRealInterval.firstElement(). Derived classes may choose different implementations for improved performance.

        Returns:
        an instance of T
      • getConverterSupplier

        public java.util.function.Supplier<Converter<? super A,​? super B>> getConverterSupplier()
        Returns:
        the supplier of converter instances