Class Streams


  • public class Streams
    extends java.lang.Object
    Utilities for creating "localizable Streams".
    • Constructor Detail

      • Streams

        public Streams()
    • Method Detail

      • localizable

        public static <T> java.util.stream.Stream<RealLocalizableSampler<T>> localizable​(IterableRealInterval<T> interval)
        Create a sequential Stream of the elements (value and location) of the given interval.

        Element locations are computed on demand only, which is suited for usages where location is only needed for a few elements. (Also see localizing(IterableRealInterval)).

        Type Parameters:
        T - pixel type
        Parameters:
        interval - interval over which to provide a Stream.
        Returns:
        a Stream<RealLocalizableSampler<T>> over the elements of the given interval.
      • localizing

        public static <T> java.util.stream.Stream<RealLocalizableSampler<T>> localizing​(IterableRealInterval<T> interval)
        Create a sequential Stream of the elements (value and location) of the given interval.

        Element location is tracked preemptively on every step, which is suited for usages where location is needed for all elements. (Also see localizable(IterableRealInterval)).

        Type Parameters:
        T - pixel type
        Parameters:
        interval - interval over which to provide a Stream.
        Returns:
        a Stream<RealLocalizableSampler<T>> over the elements of the given interval.
      • localizable

        public static <T> java.util.stream.Stream<LocalizableSampler<T>> localizable​(IterableInterval<T> interval)
        Create a sequential Stream of the elements (value and location) of the given interval.

        Element locations are computed on demand only, which is suited for usages where location is only needed for a few elements. (Also see localizing(IterableInterval)).

        Type Parameters:
        T - pixel type
        Parameters:
        interval - interval over which to provide a Stream.
        Returns:
        a Stream<LocalizableSampler<T>> over the elements of the given interval.
      • localizing

        public static <T> java.util.stream.Stream<LocalizableSampler<T>> localizing​(IterableInterval<T> interval)
        Create a sequential Stream of the elements (value and location) of the given interval.

        Element location is tracked preemptively on every step, which is suited for usages where location is needed for all elements. (Also see localizable(IterableInterval)).

        Type Parameters:
        T - pixel type
        Parameters:
        interval - interval over which to provide a Stream.
        Returns:
        a Stream<LocalizableSampler<T>> over the elements of the given interval.