Class ConvertedIterableInterval<A,B>

All Implemented Interfaces:
Iterable<B>, Dimensions, EuclideanSpace, Interval, IterableInterval<B>, IterableRealInterval<B>, RealInterval, Typed<B>, View

public class ConvertedIterableInterval<A,B> extends AbstractConvertedIterableInterval<A,B>
TODO
  • Field Details

    • converterSupplier

      protected final Supplier<Converter<? super A, ? super B>> converterSupplier
    • convertedSupplier

      protected final Supplier<? extends B> convertedSupplier
  • Constructor Details

    • ConvertedIterableInterval

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

      public ConvertedIterableInterval(IterableInterval<A> source, Converter<? super A, ? super B> converter, Supplier<? extends B> convertedSupplier)
      Parameters:
      source -
      converter -
      convertedSupplier -
  • Method Details

    • 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 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
    • getConverter

      @Deprecated public Converter<? super A, ? super B> getConverter()
      Deprecated.
      Returns an instance of the Converter. If the ConvertedIterableInterval was created with a Converter instead of a Supplier, then the returned converter will be this instance.
      Returns:
    • getConverterSupplier

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