Class RealLocalizableSamplerWrapper<T>

    • Constructor Detail

      • RealLocalizableSamplerWrapper

        RealLocalizableSamplerWrapper​(RealLocalizableSpliterator<T> delegate)
        Wrap the given delegate as Spliterator<RealLocalizableSampler<T>>.
        Parameters:
        delegate - spliterator to wrap
    • Method Detail

      • get

        public T 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.
        Specified by:
        get in interface Sampler<T>
      • getType

        public T 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.

        Specified by:
        getType in interface Sampler<T>
        Specified by:
        getType in interface Typed<T>
        Returns:
        an instance of T
      • copy

        public RealLocalizableSamplerWrapper<T> copy()
        Specified by:
        copy in interface RealLocalizableSampler<T>
        Specified by:
        copy in interface Sampler<T>
        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)
      • forEachRemaining

        public void forEachRemaining​(java.util.function.Consumer<? super RealLocalizableSampler<T>> action)
        Specified by:
        forEachRemaining in interface java.util.Spliterator<T>
      • tryAdvance

        public boolean tryAdvance​(java.util.function.Consumer<? super RealLocalizableSampler<T>> action)
        Specified by:
        tryAdvance in interface java.util.Spliterator<T>
      • trySplit

        public java.util.Spliterator<RealLocalizableSampler<T>> trySplit()
        Specified by:
        trySplit in interface java.util.Spliterator<T>
      • estimateSize

        public long estimateSize()
        Specified by:
        estimateSize in interface java.util.Spliterator<T>
      • characteristics

        public int characteristics()
        Specified by:
        characteristics in interface java.util.Spliterator<T>
      • getFloatPosition

        public float getFloatPosition​(int d)
        Description copied from interface: RealLocalizable
        Return the current position in a given dimension.
        Specified by:
        getFloatPosition in interface RealLocalizable
        Parameters:
        d - dimension
        Returns:
        dimension of current position
      • getDoublePosition

        public double getDoublePosition​(int d)
        Description copied from interface: RealLocalizable
        Return the current position in a given dimension.
        Specified by:
        getDoublePosition in interface RealLocalizable
        Parameters:
        d - dimension
        Returns:
        dimension of current position