Class ConvertedRandomAccess<A,​B>

    • Field Detail

      • converterSupplier

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

        private final Converter<? super A,​? super B> converter
      • convertedSupplier

        private final java.util.function.Supplier<? extends B> convertedSupplier
      • converted

        private final B converted
    • Constructor Detail

      • ConvertedRandomAccess

        public ConvertedRandomAccess​(RandomAccess<A> source,
                                     java.util.function.Supplier<Converter<? super A,​? super B>> converterSupplier,
                                     java.util.function.Supplier<? extends B> convertedSupplier)
        Creates a copy of b for conversion that can be accessed through get().
        Parameters:
        source -
        converterSupplier -
        convertedSupplier -
      • ConvertedRandomAccess

        public ConvertedRandomAccess​(RandomAccess<A> source,
                                     Converter<? super A,​? super B> converter,
                                     java.util.function.Supplier<? extends B> convertedSupplier)
        Use this constructor for stateless functions
        Parameters:
        source -
        converter -
        convertedSupplier -
    • Method Detail

      • get

        public B get()
        Description copied from interface: Sampler
        Access the actual T instance providing access to a pixel, sub-pixel or integral region value the Sampler points at.
      • getType

        public B getType()
        Description copied from interface: Typed
        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.

        Returns:
        an instance of T