Class BiConvertedIterableInterval<A,​B,​C>

    • Field Detail

      • converterSupplier

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

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

      • BiConvertedIterableInterval

        public BiConvertedIterableInterval​(IterableInterval<A> sourceA,
                                           IterableInterval<B> sourceB,
                                           java.util.function.Supplier<BiConverter<? super A,​? super B,​? super C>> converterSupplier,
                                           java.util.function.Supplier<? extends C> convertedSupplier)
        Creates a copy of c for conversion.
        Parameters:
        sourceA - this IterableInterval is used for all Interval related requests. When using Intervals with different sizes, make sure that this is the smaller Interval.
        sourceB -
        converterSupplier -
        convertedSupplier -
      • BiConvertedIterableInterval

        public BiConvertedIterableInterval​(IterableInterval<A> sourceA,
                                           IterableInterval<B> sourceB,
                                           BiConverter<? super A,​? super B,​? super C> converter,
                                           java.util.function.Supplier<? extends C> convertedSupplier)
        Creates a copy of c for conversion.
        Parameters:
        sourceA - this IterableInterval is used for all Interval related requests. When using Intervals with different sizes, make sure that this is the smaller Interval.
        sourceB -
        converter -
        convertedSupplier -
    • Method Detail

      • cursor

        public BiConvertedCursor<A,​B,​C> 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 BiConvertedCursor<A,​B,​C> localizingCursor()
        Creates a localizing Cursor for sourceA only because this will be used for localization. Make sure that sourceA is the IterableInterval that creates the Cursor that localizes more efficiently.
        Returns:
        fast localizing iterator
      • getDestinationType

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

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

        public C 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<BiConverter<? super A,​? super B,​? super C>> getConverterSupplier()
        Returns:
        the supplier of converter instances