List of usage examples for org.apache.commons.collections4.iterators ObjectArrayIterator ObjectArrayIterator
public ObjectArrayIterator(final E... array)
From source file:com.github.xbn.array.helper.ArrayHelperBaseComposer.java
@SuppressWarnings("unchecked") public Iterator<E> getIterator(Object obj_thatIsArray, String array_name) { try {/*from w w w .ja v a 2 s . co m*/ return (Iterator<E>) (new ObjectArrayIterator(obj_thatIsArray)); } catch (ClassCastException ccx) { throw new ClassCastException("obj_thatIsArray is not an E[]: obj_thatIsArray.getClass().getName()=\"" + obj_thatIsArray.getClass().getName() + "\". // Original exception: " + ccx); } }
From source file:net.dv8tion.jda.core.utils.cache.impl.SortedSnowflakeCacheView.java
@Nonnull @Override//from w ww . j a v a2s .c o m @SuppressWarnings("unchecked") public Iterator<T> iterator() { T[] arr = elements.values(emptyArray); Arrays.sort(arr, comparator); return new ObjectArrayIterator<>(arr); }
From source file:net.dv8tion.jda.core.utils.cache.impl.AbstractCacheView.java
@Nonnull @Override//from www .j ava 2s .co m @SuppressWarnings("unchecked") public Iterator<T> iterator() { return new ObjectArrayIterator<>(elements.values(emptyArray)); }
From source file:net.dv8tion.jda.bot.utils.cache.impl.ShardCacheViewImpl.java
@Nonnull @Override public Iterator<JDA> iterator() { JDA[] arr = elements.values(EMPTY_ARRAY); return new ObjectArrayIterator<>(arr); }