Package org.eclipse.collections.api
Interface InternalIterable<T>
-
- All Superinterfaces:
java.lang.Iterable<T>
- All Known Subinterfaces:
Bag<T>,BiMap<K,V>,ByteObjectMap<V>,CharObjectMap<V>,ConcurrentMutableMap<K,V>,DoubleObjectMap<V>,FixedSizeCollection<T>,FixedSizeList<T>,FixedSizeMap<K,V>,FixedSizeSet<T>,FloatObjectMap<V>,ImmutableBag<T>,ImmutableBagIterable<T>,ImmutableBiMap<K,V>,ImmutableByteObjectMap<V>,ImmutableCharObjectMap<V>,ImmutableCollection<T>,ImmutableDoubleObjectMap<V>,ImmutableFloatObjectMap<V>,ImmutableIntObjectMap<V>,ImmutableList<T>,ImmutableLongObjectMap<V>,ImmutableMap<K,V>,ImmutableMapIterable<K,V>,ImmutableOrderedMap<K,V>,ImmutablePrimitiveObjectMap<V>,ImmutableSet<T>,ImmutableSetIterable<T>,ImmutableShortObjectMap<V>,ImmutableSortedBag<T>,ImmutableSortedMap<K,V>,ImmutableSortedSet<T>,ImmutableStack<T>,IntObjectMap<V>,LazyIterable<T>,ListIterable<T>,LongObjectMap<V>,MapIterable<K,V>,MultiReaderBag<T>,MultiReaderList<T>,MultiReaderSet<T>,MutableBag<T>,MutableBagIterable<T>,MutableBiMap<K,V>,MutableByteObjectMap<V>,MutableCharObjectMap<V>,MutableCollection<T>,MutableDoubleObjectMap<V>,MutableFloatObjectMap<V>,MutableIntObjectMap<V>,MutableList<T>,MutableLongObjectMap<V>,MutableMap<K,V>,MutableMapIterable<K,V>,MutableOrderedMap<K,V>,MutablePrimitiveObjectMap<V>,MutableSet<T>,MutableSetIterable<T>,MutableShortObjectMap<V>,MutableSortedBag<T>,MutableSortedMap<K,V>,MutableSortedSet<T>,MutableStack<T>,OrderedIterable<T>,OrderedMap<K,V>,PrimitiveObjectMap<V>,ReversibleIterable<T>,RichIterable<T>,SetIterable<T>,ShortObjectMap<V>,SortedBag<T>,SortedIterable<T>,SortedMapIterable<K,V>,SortedSetIterable<T>,StackIterable<T>,UnsortedBag<T>,UnsortedMapIterable<K,V>,UnsortedSetIterable<T>
- All Known Implementing Classes:
AbstractArrayAdapter,AbstractBag,AbstractBiMap,AbstractCollectionAdapter,AbstractHashBag,AbstractImmutableBag,AbstractImmutableBagIterable,AbstractImmutableBiMap,AbstractImmutableBiMap.Inverse,AbstractImmutableByteObjectMap,AbstractImmutableCharObjectMap,AbstractImmutableCollection,AbstractImmutableDoubleObjectMap,AbstractImmutableFloatObjectMap,AbstractImmutableIntObjectMap,AbstractImmutableList,AbstractImmutableList.ImmutableSubList,AbstractImmutableLongObjectMap,AbstractImmutableMap,AbstractImmutableSet,AbstractImmutableShortObjectMap,AbstractImmutableSortedBag,AbstractImmutableSortedMap,AbstractImmutableSortedSet,AbstractLazyIterable,AbstractListAdapter,AbstractMapIterable,AbstractMemoryEfficientMutableList,AbstractMemoryEfficientMutableList.SubList,AbstractMemoryEfficientMutableMap,AbstractMemoryEfficientMutableSet,AbstractMultiReaderMutableCollection,AbstractMultiReaderMutableCollection.UntouchableMutableCollection,AbstractMutableBag,AbstractMutableBagIterable,AbstractMutableBiMap,AbstractMutableBiMap.Inverse,AbstractMutableCollection,AbstractMutableList,AbstractMutableList.SubList,AbstractMutableMap,AbstractMutableMapIterable,AbstractMutableSet,AbstractMutableSortedBag,AbstractMutableSortedMap,AbstractRichIterable,AbstractSynchronizedMapIterable,AbstractSynchronizedMutableCollection,AbstractSynchronizedRichIterable,AbstractUnifiedSet,AbstractUnmodifiableMutableCollection,ArrayAdapter,ArrayListAdapter,ArrayStack,BoxedMutableBooleanList,BoxedMutableBooleanSet,BoxedMutableByteList,BoxedMutableByteSet,BoxedMutableCharList,BoxedMutableCharSet,BoxedMutableDoubleList,BoxedMutableDoubleSet,BoxedMutableFloatList,BoxedMutableFloatSet,BoxedMutableIntList,BoxedMutableIntSet,BoxedMutableLongList,BoxedMutableLongSet,BoxedMutableShortList,BoxedMutableShortSet,ByteBooleanHashMap.KeyValuesView,ByteByteHashMap.KeyValuesView,ByteCharHashMap.KeyValuesView,ByteDoubleHashMap.KeyValuesView,ByteFloatHashMap.KeyValuesView,ByteIntHashMap.KeyValuesView,ByteLongHashMap.KeyValuesView,ByteObjectHashMap,ByteObjectHashMap.KeyValuesView,ByteShortHashMap.KeyValuesView,CharBooleanHashMap.KeyValuesView,CharByteHashMap.KeyValuesView,CharCharHashMap.KeyValuesView,CharDoubleHashMap.KeyValuesView,CharFloatHashMap.KeyValuesView,CharIntHashMap.KeyValuesView,CharLongHashMap.KeyValuesView,CharObjectHashMap,CharObjectHashMap.KeyValuesView,CharShortHashMap.KeyValuesView,ChunkBooleanIterable,ChunkByteIterable,ChunkCharIterable,ChunkDoubleIterable,ChunkFloatIterable,ChunkIntIterable,ChunkIterable,ChunkLongIterable,ChunkShortIterable,CollectBooleanToObjectIterable,CollectByteToObjectIterable,CollectCharToObjectIterable,CollectDoubleToObjectIterable,CollectFloatToObjectIterable,CollectIntToObjectIterable,CollectionAdapter,CollectIterable,CollectLongToObjectIterable,CollectShortToObjectIterable,CompositeFastList,CompositeIterable,ConcurrentHashMap,ConcurrentHashMapUnsafe,ConcurrentMutableHashMap,DistinctIterable,DoubleBooleanHashMap.KeyValuesView,DoubleByteHashMap.KeyValuesView,DoubleCharHashMap.KeyValuesView,DoubleDoubleHashMap.KeyValuesView,DoubleFloatHashMap.KeyValuesView,DoubleIntHashMap.KeyValuesView,DoubleLongHashMap.KeyValuesView,DoubleObjectHashMap,DoubleObjectHashMap.KeyValuesView,DoubleShortHashMap.KeyValuesView,DoubletonList,DoubletonMap,DoubletonSet,DropIterable,DropWhileIterable,EmptyList,EmptyMap,EmptySet,FastList,FlatCollectBooleanToObjectIterable,FlatCollectByteToObjectIterable,FlatCollectCharToObjectIterable,FlatCollectDoubleToObjectIterable,FlatCollectFloatToObjectIterable,FlatCollectIntToObjectIterable,FlatCollectIterable,FlatCollectLongToObjectIterable,FlatCollectShortToObjectIterable,FloatBooleanHashMap.KeyValuesView,FloatByteHashMap.KeyValuesView,FloatCharHashMap.KeyValuesView,FloatDoubleHashMap.KeyValuesView,FloatFloatHashMap.KeyValuesView,FloatIntHashMap.KeyValuesView,FloatLongHashMap.KeyValuesView,FloatObjectHashMap,FloatObjectHashMap.KeyValuesView,FloatShortHashMap.KeyValuesView,HashBag,HashBagWithHashingStrategy,HashBiMap,ImmutableArrayBag,ImmutableArrayList,ImmutableArrayStack,ImmutableByteObjectEmptyMap,ImmutableByteObjectHashMap,ImmutableByteObjectSingletonMap,ImmutableCharObjectEmptyMap,ImmutableCharObjectHashMap,ImmutableCharObjectSingletonMap,ImmutableDecapletonList,ImmutableDoubleObjectEmptyMap,ImmutableDoubleObjectHashMap,ImmutableDoubleObjectSingletonMap,ImmutableDoubletonList,ImmutableDoubletonMap,ImmutableDoubletonSet,ImmutableEmptyBag,ImmutableEmptyList,ImmutableEmptyMap,ImmutableEmptyMapWithHashingStrategy,ImmutableEmptySet,ImmutableEmptySetWithHashingStrategy,ImmutableEmptySortedBag,ImmutableEmptySortedMap,ImmutableEmptySortedSet,ImmutableEmptyStack,ImmutableFloatObjectEmptyMap,ImmutableFloatObjectHashMap,ImmutableFloatObjectSingletonMap,ImmutableHashBag,ImmutableHashBiMap,ImmutableIntObjectEmptyMap,ImmutableIntObjectHashMap,ImmutableIntObjectSingletonMap,ImmutableLongObjectEmptyMap,ImmutableLongObjectHashMap,ImmutableLongObjectSingletonMap,ImmutableNonupletonList,ImmutableNotEmptyStack,ImmutableOctupletonList,ImmutableOrderedMapAdapter,ImmutableQuadrupletonList,ImmutableQuadrupletonMap,ImmutableQuadrupletonSet,ImmutableQuintupletonList,ImmutableSeptupletonList,ImmutableSextupletonList,ImmutableShortObjectEmptyMap,ImmutableShortObjectHashMap,ImmutableShortObjectSingletonMap,ImmutableSingletonBag,ImmutableSingletonList,ImmutableSingletonMap,ImmutableSingletonSet,ImmutableSortedBagImpl,ImmutableTreeMap,ImmutableTreeSet,ImmutableTreeSet.SortedSetIterableParallelIterable.SortedSetIterableParallelBatchLazyIterable,ImmutableTripletonList,ImmutableTripletonMap,ImmutableTripletonSet,ImmutableUnifiedMap,ImmutableUnifiedMapWithHashingStrategy,ImmutableUnifiedSet,ImmutableUnifiedSetWithHashingStrategy,IntBooleanHashMap.KeyValuesView,IntByteHashMap.KeyValuesView,IntCharHashMap.KeyValuesView,IntDoubleHashMap.KeyValuesView,Interval,IntFloatHashMap.KeyValuesView,IntIntHashMap.KeyValuesView,IntLongHashMap.KeyValuesView,IntObjectHashMap,IntObjectHashMap.KeyValuesView,IntShortHashMap.KeyValuesView,LazyIterableAdapter,ListAdapter,ListIterableParallelIterable.ListIterableParallelBatchLazyIterable,LongBooleanHashMap.KeyValuesView,LongByteHashMap.KeyValuesView,LongCharHashMap.KeyValuesView,LongDoubleHashMap.KeyValuesView,LongFloatHashMap.KeyValuesView,LongIntHashMap.KeyValuesView,LongLongHashMap.KeyValuesView,LongObjectHashMap,LongObjectHashMap.KeyValuesView,LongShortHashMap.KeyValuesView,MapAdapter,MultiReaderFastList,MultiReaderFastList.UntouchableMutableList,MultiReaderHashBag,MultiReaderHashBag.UntouchableMutableBag,MultiReaderUnifiedSet,MultiReaderUnifiedSet.UntouchableMutableSet,ObjectBooleanHashMap.KeysView,ObjectBooleanHashMap.KeyValuesView,ObjectBooleanHashMapWithHashingStrategy.KeysView,ObjectBooleanHashMapWithHashingStrategy.KeyValuesView,ObjectByteHashMap.KeysView,ObjectByteHashMap.KeyValuesView,ObjectByteHashMapWithHashingStrategy.KeysView,ObjectByteHashMapWithHashingStrategy.KeyValuesView,ObjectCharHashMap.KeysView,ObjectCharHashMap.KeyValuesView,ObjectCharHashMapWithHashingStrategy.KeysView,ObjectCharHashMapWithHashingStrategy.KeyValuesView,ObjectDoubleHashMap.KeysView,ObjectDoubleHashMap.KeyValuesView,ObjectDoubleHashMapWithHashingStrategy.KeysView,ObjectDoubleHashMapWithHashingStrategy.KeyValuesView,ObjectFloatHashMap.KeysView,ObjectFloatHashMap.KeyValuesView,ObjectFloatHashMapWithHashingStrategy.KeysView,ObjectFloatHashMapWithHashingStrategy.KeyValuesView,ObjectIntHashMap.KeysView,ObjectIntHashMap.KeyValuesView,ObjectIntHashMapWithHashingStrategy.KeysView,ObjectIntHashMapWithHashingStrategy.KeyValuesView,ObjectLongHashMap.KeysView,ObjectLongHashMap.KeyValuesView,ObjectLongHashMapWithHashingStrategy.KeysView,ObjectLongHashMapWithHashingStrategy.KeyValuesView,ObjectShortHashMap.KeysView,ObjectShortHashMap.KeyValuesView,ObjectShortHashMapWithHashingStrategy.KeysView,ObjectShortHashMapWithHashingStrategy.KeyValuesView,OrderedMapAdapter,QuadrupletonList,QuadrupletonSet,QuintupletonList,RandomAccessListAdapter,RejectIterable,ReverseIterable,SelectInstancesOfIterable,SelectIterable,SetAdapter,SextupletonList,ShortBooleanHashMap.KeyValuesView,ShortByteHashMap.KeyValuesView,ShortCharHashMap.KeyValuesView,ShortDoubleHashMap.KeyValuesView,ShortFloatHashMap.KeyValuesView,ShortIntHashMap.KeyValuesView,ShortLongHashMap.KeyValuesView,ShortObjectHashMap,ShortObjectHashMap.KeyValuesView,ShortShortHashMap.KeyValuesView,SingletonList,SingletonMap,SingletonSet,SortedMapAdapter,SortedSetAdapter,SynchronizedBag,SynchronizedBiMap,SynchronizedByteObjectMap,SynchronizedCharObjectMap,SynchronizedDoubleObjectMap,SynchronizedFloatObjectMap,SynchronizedIntObjectMap,SynchronizedLongObjectMap,SynchronizedMutableCollection,SynchronizedMutableList,SynchronizedMutableMap,SynchronizedMutableSet,SynchronizedRichIterable,SynchronizedShortObjectMap,SynchronizedSortedBag,SynchronizedSortedMap,SynchronizedSortedSet,SynchronizedStack,TakeIterable,TakeWhileIterable,TapIterable,TreeBag,TreeSortedMap,TreeSortedSet,TripletonList,TripletonMap,TripletonSet,UnifiedMap,UnifiedMapWithHashingStrategy,UnifiedSet,UnifiedSet.UnifiedSetParallelUnsortedIterable.UnifiedSetParallelSplitLazyIterable,UnifiedSetWithHashingStrategy,UnifiedSetWithHashingStrategy.UnifiedSetParallelUnsortedIterable.UnifiedSetParallelSplitLazyIterable,UnmodifiableBag,UnmodifiableBiMap,UnmodifiableByteObjectMap,UnmodifiableCharObjectMap,UnmodifiableDoubleObjectMap,UnmodifiableFloatObjectMap,UnmodifiableIntObjectMap,UnmodifiableLongObjectMap,UnmodifiableMutableCollection,UnmodifiableMutableList,UnmodifiableMutableList.RandomAccessUnmodifiableMutableList,UnmodifiableMutableMap,UnmodifiableMutableOrderedMap,UnmodifiableMutableSet,UnmodifiableRichIterable,UnmodifiableShortObjectMap,UnmodifiableSortedBag,UnmodifiableSortedSet,UnmodifiableStack,UnmodifiableTreeMap,ZipIterable,ZipWithIndexIterable
public interface InternalIterable<T> extends java.lang.Iterable<T>The base interface for all Eclipse Collections. All Eclipse Collections are internally iterable, and this interface provides the base set of internal iterators that every Eclipse collection should implement.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidforEach(java.util.function.Consumer<? super T> consumer)voidforEach(Procedure<? super T> procedure)The procedure is executed for each element in the iterable.<P> voidforEachWith(Procedure2<? super T,? super P> procedure, P parameter)The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.voidforEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)Deprecated.in 6.0.
-
-
-
Method Detail
-
forEach
void forEach(Procedure<? super T> procedure)
The procedure is executed for each element in the iterable.Example using a Java 8 lambda:
people.forEach(Procedures.cast(person -> LOGGER.info(person.getName())));
Example using an anonymous inner class:
people.forEach(new Procedure<Person>() { public void value(Person person) { LOGGER.info(person.getName()); } });NOTE: This method started to conflict withIterable.forEach(java.util.function.Consumer)since Java 1.8. It is recommended to useRichIterable.each(Procedure)instead to avoid casting to Procedure.- See Also:
RichIterable.each(Procedure),Iterable.forEach(java.util.function.Consumer)
-
forEach
default void forEach(java.util.function.Consumer<? super T> consumer)
- Specified by:
forEachin interfacejava.lang.Iterable<T>
-
forEachWithIndex
@Deprecated void forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
Deprecated.in 6.0. UseOrderedIterable.forEachWithIndex(ObjectIntProcedure)instead.Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure.Example using a Java 8 lambda:
people.forEachWithIndex((Person person, int index) -> LOGGER.info("Index: " + index + " person: " + person.getName()));Example using an anonymous inner class:
people.forEachWithIndex(new ObjectIntProcedure<Person>() { public void value(Person person, int index) { LOGGER.info("Index: " + index + " person: " + person.getName()); } });
-
forEachWith
<P> void forEachWith(Procedure2<? super T,? super P> procedure, P parameter)
The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.Example using a Java 8 lambda:
people.forEachWith((Person person, Person other) -> { if (person.isRelatedTo(other)) { LOGGER.info(person.getName()); } }, fred);Example using an anonymous inner class:
people.forEachWith(new Procedure2<Person, Person>() { public void value(Person person, Person other) { if (person.isRelatedTo(other)) { LOGGER.info(person.getName()); } } }, fred);
-
-