@Test public void testEmptyIterator() { assertSame(EmptyIterator.INSTANCE, IteratorUtils.EMPTY_ITERATOR); assertSame(EmptyIterator.RESETTABLE_INSTANCE, IteratorUtils.EMPTY_ITERATOR); assertEquals(true, IteratorUtils.EMPTY_ITERATOR instanceof Iterator); assertEquals(true, IteratorUtils.EMPTY_ITERATOR instanceof ResettableIterator); assertEquals(false, IteratorUtils.EMPTY_ITERATOR instanceof OrderedIterator); assertEquals(false, IteratorUtils.EMPTY_ITERATOR instanceof ListIterator); assertEquals(false, IteratorUtils.EMPTY_ITERATOR instanceof MapIterator); assertEquals(false, IteratorUtils.EMPTY_ITERATOR.hasNext()); IteratorUtils.EMPTY_ITERATOR.reset(); assertSame(IteratorUtils.EMPTY_ITERATOR, IteratorUtils.EMPTY_ITERATOR); assertSame(IteratorUtils.EMPTY_ITERATOR, IteratorUtils.emptyIterator()); try { IteratorUtils.EMPTY_ITERATOR.next(); fail(); } catch (final NoSuchElementException ex) {} try { IteratorUtils.EMPTY_ITERATOR.remove(); fail(); } catch (final IllegalStateException ex) {} }
public static <E> ResettableIterator<E> emptyIterator() { return EmptyIterator.<E>resettableEmptyIterator(); }
IteratorUtils { public static <E> ResettableIterator<E> emptyIterator() { return EmptyIterator.<E>resettableEmptyIterator(); } }
IteratorUtils { public static <E> ResettableIterator<E> emptyIterator() { return EmptyIterator.<E>resettableEmptyIterator(); } private  IteratorUtils(); }
IteratorUtils { public static <E> ResettableIterator<E> emptyIterator() { return EmptyIterator.<E>resettableEmptyIterator(); } private  IteratorUtils(); static ResettableIterator<E> emptyIterator(); static ResettableListIterator<E> emptyListIterator(); static OrderedIterator<E> emptyOrderedIterator(); static MapIterator<K, V> emptyMapIterator(); static OrderedMapIterator<K, V> emptyOrderedMapIterator(); static ResettableIterator<E> singletonIterator(final E object); static ListIterator<E> singletonListIterator(final E object); static ResettableIterator<E> arrayIterator(final E... array); static ResettableIterator<E> arrayIterator(final Object array); static ResettableIterator<E> arrayIterator(final E[] array, final int start); static ResettableIterator<E> arrayIterator(final Object array, final int start); static ResettableIterator<E> arrayIterator(final E[] array, final int start, final int end); static ResettableIterator<E> arrayIterator(final Object array, final int start, final int end); static ResettableListIterator<E> arrayListIterator(final E... array); static ResettableListIterator<E> arrayListIterator(final Object array); static ResettableListIterator<E> arrayListIterator(final E[] array, final int start); static ResettableListIterator<E> arrayListIterator(final Object array, final int start); static ResettableListIterator<E> arrayListIterator(final E[] array, final int start, final int end); static ResettableListIterator<E> arrayListIterator(final Object array, final int start, final int end); static BoundedIterator<E> boundedIterator(final Iterator<? extends E> iterator, long max); static BoundedIterator<E> boundedIterator(final Iterator<? extends E> iterator,
                                                         long offset, long max); static Iterator<E> unmodifiableIterator(final Iterator<E> iterator); static ListIterator<E> unmodifiableListIterator(final ListIterator<E> listIterator); static MapIterator<K, V> unmodifiableMapIterator(final MapIterator<K, V> mapIterator); static Iterator<E> chainedIterator(final Iterator<? extends E> iterator1,
                                                  final Iterator<? extends E> iterator2); static Iterator<E> chainedIterator(final Iterator<? extends E>... iterators); static Iterator<E> chainedIterator(final Collection<Iterator<? extends E>> iterators); static Iterator<E> collatedIterator(final Comparator<? super E> comparator,
                                                   final Iterator<? extends E> iterator1,
                                                   final Iterator<? extends E> iterator2); static Iterator<E> collatedIterator(final Comparator<? super E> comparator,
                                                   final Iterator<? extends E>... iterators); static Iterator<E> collatedIterator(final Comparator<? super E> comparator,
                                                   final Collection<Iterator<? extends E>> iterators); static Iterator<E> objectGraphIterator(final E root,
            final Transformer<? super E, ? extends E> transformer); static Iterator<O> transformedIterator(final Iterator<? extends I> iterator,
            final Transformer<? super I, ? extends O> transform); static Iterator<E> filteredIterator(final Iterator<? extends E> iterator,
                                                   final Predicate<? super E> predicate); static ListIterator<E> filteredListIterator(final ListIterator<? extends E> listIterator,
            final Predicate<? super E> predicate); static ResettableIterator<E> loopingIterator(final Collection<? extends E> coll); static ResettableListIterator<E> loopingListIterator(final List<E> list); static NodeListIterator nodeListIterator(final NodeList nodeList); static NodeListIterator nodeListIterator(final Node node); static Iterator<E> peekingIterator(final Iterator<? extends E> iterator); static Iterator<E> pushbackIterator(final Iterator<? extends E> iterator); static SkippingIterator<E> skippingIterator(final Iterator<E> iterator, long offset); static ZippingIterator<E> zippingIterator(final Iterator<? extends E> a,
                                                         final Iterator<? extends E> b); static ZippingIterator<E> zippingIterator(final Iterator<? extends E> a,
                                                         final Iterator<? extends E> b,
                                                         final Iterator<? extends E> c); static ZippingIterator<E> zippingIterator(final Iterator<? extends E>... iterators); static Iterator<E> asIterator(final Enumeration<? extends E> enumeration); static Iterator<E> asIterator(final Enumeration<? extends E> enumeration,
                                             final Collection<? super E> removeCollection); static Enumeration<E> asEnumeration(final Iterator<? extends E> iterator); static Iterable<E> asIterable(final Iterator<? extends E> iterator); static Iterable<E> asMultipleUseIterable(final Iterator<? extends E> iterator); static ListIterator<E> toListIterator(final Iterator<? extends E> iterator); static Object[] toArray(final Iterator<?> iterator); static E[] toArray(final Iterator<? extends E> iterator, final Class<E> arrayClass); static List<E> toList(final Iterator<? extends E> iterator); static List<E> toList(final Iterator<? extends E> iterator, final int estimatedSize); static Iterator<?> getIterator(final Object obj); static void forEach(final Iterator<E> iterator, final Closure<? super E> closure); static E forEachButLast(final Iterator<E> iterator, final Closure<? super E> closure); static E find(final Iterator<E> iterator, final Predicate<? super E> predicate); static int indexOf(final Iterator<E> iterator, final Predicate<? super E> predicate); static boolean matchesAny(final Iterator<E> iterator, final Predicate<? super E> predicate); static boolean matchesAll(final Iterator<E> iterator, final Predicate<? super E> predicate); static boolean isEmpty(final Iterator<?> iterator); static boolean contains(final Iterator<E> iterator, final Object object); static E get(final Iterator<E> iterator, final int index); static int size(final Iterator<?> iterator); static String toString(final Iterator<E> iterator); static String toString(final Iterator<E> iterator,
                                      final Transformer<? super E, String> transformer); static String toString(final Iterator<E> iterator,
                                      final Transformer<? super E, String> transformer,
                                      final String delimiter,
                                      final String prefix,
                                      final String suffix); }
IteratorUtils { public static <E> ResettableIterator<E> emptyIterator() { return EmptyIterator.<E>resettableEmptyIterator(); } private  IteratorUtils(); static ResettableIterator<E> emptyIterator(); static ResettableListIterator<E> emptyListIterator(); static OrderedIterator<E> emptyOrderedIterator(); static MapIterator<K, V> emptyMapIterator(); static OrderedMapIterator<K, V> emptyOrderedMapIterator(); static ResettableIterator<E> singletonIterator(final E object); static ListIterator<E> singletonListIterator(final E object); static ResettableIterator<E> arrayIterator(final E... array); static ResettableIterator<E> arrayIterator(final Object array); static ResettableIterator<E> arrayIterator(final E[] array, final int start); static ResettableIterator<E> arrayIterator(final Object array, final int start); static ResettableIterator<E> arrayIterator(final E[] array, final int start, final int end); static ResettableIterator<E> arrayIterator(final Object array, final int start, final int end); static ResettableListIterator<E> arrayListIterator(final E... array); static ResettableListIterator<E> arrayListIterator(final Object array); static ResettableListIterator<E> arrayListIterator(final E[] array, final int start); static ResettableListIterator<E> arrayListIterator(final Object array, final int start); static ResettableListIterator<E> arrayListIterator(final E[] array, final int start, final int end); static ResettableListIterator<E> arrayListIterator(final Object array, final int start, final int end); static BoundedIterator<E> boundedIterator(final Iterator<? extends E> iterator, long max); static BoundedIterator<E> boundedIterator(final Iterator<? extends E> iterator,
                                                         long offset, long max); static Iterator<E> unmodifiableIterator(final Iterator<E> iterator); static ListIterator<E> unmodifiableListIterator(final ListIterator<E> listIterator); static MapIterator<K, V> unmodifiableMapIterator(final MapIterator<K, V> mapIterator); static Iterator<E> chainedIterator(final Iterator<? extends E> iterator1,
                                                  final Iterator<? extends E> iterator2); static Iterator<E> chainedIterator(final Iterator<? extends E>... iterators); static Iterator<E> chainedIterator(final Collection<Iterator<? extends E>> iterators); static Iterator<E> collatedIterator(final Comparator<? super E> comparator,
                                                   final Iterator<? extends E> iterator1,
                                                   final Iterator<? extends E> iterator2); static Iterator<E> collatedIterator(final Comparator<? super E> comparator,
                                                   final Iterator<? extends E>... iterators); static Iterator<E> collatedIterator(final Comparator<? super E> comparator,
                                                   final Collection<Iterator<? extends E>> iterators); static Iterator<E> objectGraphIterator(final E root,
            final Transformer<? super E, ? extends E> transformer); static Iterator<O> transformedIterator(final Iterator<? extends I> iterator,
            final Transformer<? super I, ? extends O> transform); static Iterator<E> filteredIterator(final Iterator<? extends E> iterator,
                                                   final Predicate<? super E> predicate); static ListIterator<E> filteredListIterator(final ListIterator<? extends E> listIterator,
            final Predicate<? super E> predicate); static ResettableIterator<E> loopingIterator(final Collection<? extends E> coll); static ResettableListIterator<E> loopingListIterator(final List<E> list); static NodeListIterator nodeListIterator(final NodeList nodeList); static NodeListIterator nodeListIterator(final Node node); static Iterator<E> peekingIterator(final Iterator<? extends E> iterator); static Iterator<E> pushbackIterator(final Iterator<? extends E> iterator); static SkippingIterator<E> skippingIterator(final Iterator<E> iterator, long offset); static ZippingIterator<E> zippingIterator(final Iterator<? extends E> a,
                                                         final Iterator<? extends E> b); static ZippingIterator<E> zippingIterator(final Iterator<? extends E> a,
                                                         final Iterator<? extends E> b,
                                                         final Iterator<? extends E> c); static ZippingIterator<E> zippingIterator(final Iterator<? extends E>... iterators); static Iterator<E> asIterator(final Enumeration<? extends E> enumeration); static Iterator<E> asIterator(final Enumeration<? extends E> enumeration,
                                             final Collection<? super E> removeCollection); static Enumeration<E> asEnumeration(final Iterator<? extends E> iterator); static Iterable<E> asIterable(final Iterator<? extends E> iterator); static Iterable<E> asMultipleUseIterable(final Iterator<? extends E> iterator); static ListIterator<E> toListIterator(final Iterator<? extends E> iterator); static Object[] toArray(final Iterator<?> iterator); static E[] toArray(final Iterator<? extends E> iterator, final Class<E> arrayClass); static List<E> toList(final Iterator<? extends E> iterator); static List<E> toList(final Iterator<? extends E> iterator, final int estimatedSize); static Iterator<?> getIterator(final Object obj); static void forEach(final Iterator<E> iterator, final Closure<? super E> closure); static E forEachButLast(final Iterator<E> iterator, final Closure<? super E> closure); static E find(final Iterator<E> iterator, final Predicate<? super E> predicate); static int indexOf(final Iterator<E> iterator, final Predicate<? super E> predicate); static boolean matchesAny(final Iterator<E> iterator, final Predicate<? super E> predicate); static boolean matchesAll(final Iterator<E> iterator, final Predicate<? super E> predicate); static boolean isEmpty(final Iterator<?> iterator); static boolean contains(final Iterator<E> iterator, final Object object); static E get(final Iterator<E> iterator, final int index); static int size(final Iterator<?> iterator); static String toString(final Iterator<E> iterator); static String toString(final Iterator<E> iterator,
                                      final Transformer<? super E, String> transformer); static String toString(final Iterator<E> iterator,
                                      final Transformer<? super E, String> transformer,
                                      final String delimiter,
                                      final String prefix,
                                      final String suffix); @SuppressWarnings("rawtypes")
    static final ResettableIterator EMPTY_ITERATOR; @SuppressWarnings("rawtypes")
    static final ResettableListIterator EMPTY_LIST_ITERATOR; @SuppressWarnings("rawtypes")
    static final OrderedIterator EMPTY_ORDERED_ITERATOR; @SuppressWarnings("rawtypes")
    static final MapIterator EMPTY_MAP_ITERATOR; @SuppressWarnings("rawtypes")
    static final OrderedMapIterator EMPTY_ORDERED_MAP_ITERATOR; }