Class ConvertedCursor<A,​B>

    • Field Detail

      • converterSupplier

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

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

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

        protected final B converted
    • Constructor Detail

      • ConvertedCursor

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

        public ConvertedCursor​(Cursor<A> source,
                               Converter<? super A,​? super B> converter,
                               java.util.function.Supplier<? extends B> convertedSupplier)
        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
      • copy

        public ConvertedCursor<A,​B> copy()
        Specified by:
        copy in interface Cursor<A>
        Specified by:
        copy in interface RealCursor<A>
        Specified by:
        copy in interface Sampler<A>
        Specified by:
        copy in class AbstractConvertedCursor<A,​B>
        Returns:
        - A new Sampler in the same state accessing the same values. It does NOT copy T, just the state of the Sampler. Otherwise use T.copy() if available. Sampler.copy().get() == Sampler.get(), i.e. both hold the same value, not necessarily the same instance (this is the case for an ArrayCursor for example)