Class IteratorHelper

java.lang.Object
org.javimmutable.collections.iterators.IteratorHelper

public class IteratorHelper extends Object
  • Constructor Details

    • IteratorHelper

      public IteratorHelper()
  • Method Details

    • iteratorEquals

      public static boolean iteratorEquals(@Nonnull Iterator<?> a, @Nonnull Iterator<?> b)
    • iteratorHashCode

      public static int iteratorHashCode(@Nonnull Iterator<?> a)
    • iteratorToString

      public static String iteratorToString(Iterator<?> iterator)
    • plainIterable

      public static <T> Iterable<T> plainIterable(Iterable<T> values)
      Utility method, useful in unit tests, that essentially casts away actual type of an object so that Iterable version of an overload is triggered instead of more specific class.
    • reverse

      public static <T> Iterator<T> reverse(Iterator<? extends T> values)