Class CollectShortIterable<T>
- java.lang.Object
-
- org.eclipse.collections.impl.lazy.primitive.AbstractLazyShortIterable
-
- org.eclipse.collections.impl.lazy.primitive.CollectShortIterable<T>
-
- All Implemented Interfaces:
LazyShortIterable
,PrimitiveIterable
,ShortIterable
public class CollectShortIterable<T> extends AbstractLazyShortIterable
This file was automatically generated from template file collectPrimitiveIterable.stg.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
CollectShortIterable.ShortFunctionToProcedure<T>
-
Field Summary
Fields Modifier and Type Field Description private ShortFunction<? super T>
function
private LazyIterable<T>
iterable
private CollectShortIterable.ShortFunctionToProcedure<T>
shortFunctionToProcedure
-
Constructor Summary
Constructors Constructor Description CollectShortIterable(LazyIterable<T> adapted, ShortFunction<? super T> function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSatisfy(ShortPredicate predicate)
Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.boolean
anySatisfy(ShortPredicate predicate)
Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.boolean
containsAll(short... source)
Returns true if all of the values specified in the source array are contained in the ShortIterable, and false if they are not.boolean
containsAll(ShortIterable source)
Returns true if all of the values specified in the source ShortIterable are contained in the ShortIterable, and false if they are not.int
count(ShortPredicate predicate)
Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.void
each(ShortProcedure procedure)
A synonym for forEach.boolean
isEmpty()
Returns true if this iterable has zero items.boolean
notEmpty()
The English equivalent of !this.isEmpty()ShortIterator
shortIterator()
Returns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style.int
size()
Returns the number of items in this iterable.short[]
toArray()
Converts the ShortIterable to a primitive short array.MutableShortBag
toBag()
Converts the ShortIterable to a new MutableShortBag.MutableShortList
toList()
Converts the ShortIterable to a new MutableShortList.MutableShortSet
toSet()
Converts the ShortIterable to a new MutableShortSet.short[]
toSortedArray()
-
Methods inherited from class org.eclipse.collections.impl.lazy.primitive.AbstractLazyShortIterable
appendString, appendString, appendString, asLazy, average, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, detectIfNone, flatCollect, injectInto, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, reject, select, sum, tap, toSortedList, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.ShortIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toArray, toSortedList, toSortedListBy, toSortedListBy
-
-
-
-
Field Detail
-
iterable
private final LazyIterable<T> iterable
-
function
private final ShortFunction<? super T> function
-
shortFunctionToProcedure
private final CollectShortIterable.ShortFunctionToProcedure<T> shortFunctionToProcedure
-
-
Constructor Detail
-
CollectShortIterable
public CollectShortIterable(LazyIterable<T> adapted, ShortFunction<? super T> function)
-
-
Method Detail
-
shortIterator
public ShortIterator shortIterator()
Description copied from interface:ShortIterable
Returns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style.
-
each
public void each(ShortProcedure procedure)
Description copied from interface:ShortIterable
A synonym for forEach.- Since:
- 7.0.
-
size
public int size()
Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in interfacePrimitiveIterable
- Overrides:
size
in classAbstractLazyShortIterable
-
isEmpty
public boolean isEmpty()
Description copied from interface:PrimitiveIterable
Returns true if this iterable has zero items.- Specified by:
isEmpty
in interfacePrimitiveIterable
- Overrides:
isEmpty
in classAbstractLazyShortIterable
-
notEmpty
public boolean notEmpty()
Description copied from interface:PrimitiveIterable
The English equivalent of !this.isEmpty()- Specified by:
notEmpty
in interfacePrimitiveIterable
- Overrides:
notEmpty
in classAbstractLazyShortIterable
-
count
public int count(ShortPredicate predicate)
Description copied from interface:ShortIterable
Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.- Specified by:
count
in interfaceShortIterable
- Overrides:
count
in classAbstractLazyShortIterable
-
anySatisfy
public boolean anySatisfy(ShortPredicate predicate)
Description copied from interface:ShortIterable
Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceShortIterable
- Overrides:
anySatisfy
in classAbstractLazyShortIterable
-
allSatisfy
public boolean allSatisfy(ShortPredicate predicate)
Description copied from interface:ShortIterable
Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceShortIterable
- Overrides:
allSatisfy
in classAbstractLazyShortIterable
-
toArray
public short[] toArray()
Description copied from interface:ShortIterable
Converts the ShortIterable to a primitive short array.- Specified by:
toArray
in interfaceShortIterable
- Overrides:
toArray
in classAbstractLazyShortIterable
-
toSortedArray
public short[] toSortedArray()
- Specified by:
toSortedArray
in interfaceShortIterable
- Overrides:
toSortedArray
in classAbstractLazyShortIterable
-
toList
public MutableShortList toList()
Description copied from interface:ShortIterable
Converts the ShortIterable to a new MutableShortList.- Specified by:
toList
in interfaceShortIterable
- Overrides:
toList
in classAbstractLazyShortIterable
-
toSet
public MutableShortSet toSet()
Description copied from interface:ShortIterable
Converts the ShortIterable to a new MutableShortSet.- Specified by:
toSet
in interfaceShortIterable
- Overrides:
toSet
in classAbstractLazyShortIterable
-
toBag
public MutableShortBag toBag()
Description copied from interface:ShortIterable
Converts the ShortIterable to a new MutableShortBag.- Specified by:
toBag
in interfaceShortIterable
- Overrides:
toBag
in classAbstractLazyShortIterable
-
containsAll
public boolean containsAll(short... source)
Description copied from interface:ShortIterable
Returns true if all of the values specified in the source array are contained in the ShortIterable, and false if they are not.- Specified by:
containsAll
in interfaceShortIterable
- Overrides:
containsAll
in classAbstractLazyShortIterable
-
containsAll
public boolean containsAll(ShortIterable source)
Description copied from interface:ShortIterable
Returns true if all of the values specified in the source ShortIterable are contained in the ShortIterable, and false if they are not.- Specified by:
containsAll
in interfaceShortIterable
- Overrides:
containsAll
in classAbstractLazyShortIterable
-
-