Class LazyShortIterableAdapter
java.lang.Object
org.eclipse.collections.impl.lazy.primitive.AbstractLazyShortIterable
org.eclipse.collections.impl.lazy.primitive.LazyShortIterableAdapter
- All Implemented Interfaces:
LazyShortIterable, PrimitiveIterable, ShortIterable
This file was automatically generated from template file lazyPrimitiveIterableAdapter.stg.
- Since:
- 3.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallSatisfy(ShortPredicate predicate) Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.booleananySatisfy(ShortPredicate predicate) Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.voidappendString(Appendable appendable) Prints a string representation of this collection onto the givenAppendable.voidappendString(Appendable appendable, String separator) Prints a string representation of this collection onto the givenAppendable.voidappendString(Appendable appendable, String start, String separator, String end) Prints a string representation of this collection onto the givenAppendable.doubleaverage()booleancontains(short value) Returns true if the value is contained in the ShortIterable, and false if it is not.booleancontainsAll(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.booleancontainsAll(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.intcount(ShortPredicate predicate) Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.shortdetectIfNone(ShortPredicate predicate, short ifNone) voideach(ShortProcedure procedure) A synonym for forEach.<T> TinjectInto(T injectedValue, ObjectShortToObjectFunction<? super T, ? extends T> function) booleanisEmpty()Returns true if this iterable has zero items.Returns a string representation of this collection by delegating toPrimitiveIterable.makeString(String)and defaulting the separator parameter to the characters", "(comma and space).makeString(String separator) Returns a string representation of this collection by delegating toPrimitiveIterable.makeString(String, String, String)and defaulting the start and end parameters to""(the empty String).makeString(String start, String separator, String end) Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.shortmax()shortmaxIfEmpty(short defaultValue) doublemedian()shortmin()shortminIfEmpty(short defaultValue) booleannoneSatisfy(ShortPredicate predicate) Returns true if none of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.booleannotEmpty()The English equivalent of !this.isEmpty()Returns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style.intsize()Returns the number of items in this iterable.longsum()short[]toArray()Converts the ShortIterable to a primitive short array.toBag()Converts the ShortIterable to a new MutableShortBag.toList()Converts the ShortIterable to a new MutableShortList.toSet()Converts the ShortIterable to a new MutableShortSet.short[]toString()Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets.Methods inherited from class AbstractLazyShortIterable
asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, reject, select, tapMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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 Details
-
delegate
-
-
Constructor Details
-
LazyShortIterableAdapter
-
-
Method Details
-
shortIterator
Description copied from interface:ShortIterableReturns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style. -
each
-
size
public int size()Description copied from interface:PrimitiveIterableReturns the number of items in this iterable.- Specified by:
sizein interfacePrimitiveIterable- Overrides:
sizein classAbstractLazyShortIterable
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveIterableReturns true if this iterable has zero items.- Specified by:
isEmptyin interfacePrimitiveIterable- Overrides:
isEmptyin classAbstractLazyShortIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterableThe English equivalent of !this.isEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable- Overrides:
notEmptyin classAbstractLazyShortIterable
-
count
Description copied from interface:ShortIterableReturns a count of the number of elements in the ShortIterable that return true for the specified predicate.- Specified by:
countin interfaceShortIterable- Overrides:
countin classAbstractLazyShortIterable
-
anySatisfy
Description copied from interface:ShortIterableReturns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfyin interfaceShortIterable- Overrides:
anySatisfyin classAbstractLazyShortIterable
-
allSatisfy
Description copied from interface:ShortIterableReturns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfyin interfaceShortIterable- Overrides:
allSatisfyin classAbstractLazyShortIterable
-
noneSatisfy
Description copied from interface:ShortIterableReturns true if none of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfyin interfaceShortIterable- Overrides:
noneSatisfyin classAbstractLazyShortIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceShortIterable- Overrides:
detectIfNonein classAbstractLazyShortIterable
-
sum
public long sum()- Specified by:
sumin interfaceShortIterable- Overrides:
sumin classAbstractLazyShortIterable
-
max
public short max()- Specified by:
maxin interfaceShortIterable- Overrides:
maxin classAbstractLazyShortIterable
-
min
public short min()- Specified by:
minin interfaceShortIterable- Overrides:
minin classAbstractLazyShortIterable
-
minIfEmpty
public short minIfEmpty(short defaultValue) - Specified by:
minIfEmptyin interfaceShortIterable- Overrides:
minIfEmptyin classAbstractLazyShortIterable
-
maxIfEmpty
public short maxIfEmpty(short defaultValue) - Specified by:
maxIfEmptyin interfaceShortIterable- Overrides:
maxIfEmptyin classAbstractLazyShortIterable
-
average
public double average()- Specified by:
averagein interfaceShortIterable- Overrides:
averagein classAbstractLazyShortIterable
-
median
public double median()- Specified by:
medianin interfaceShortIterable- Overrides:
medianin classAbstractLazyShortIterable
-
toSortedArray
public short[] toSortedArray()- Specified by:
toSortedArrayin interfaceShortIterable- Overrides:
toSortedArrayin classAbstractLazyShortIterable
-
toSortedList
- Specified by:
toSortedListin interfaceShortIterable- Overrides:
toSortedListin classAbstractLazyShortIterable
-
toArray
public short[] toArray()Description copied from interface:ShortIterableConverts the ShortIterable to a primitive short array.- Specified by:
toArrayin interfaceShortIterable- Overrides:
toArrayin classAbstractLazyShortIterable
-
toString
Description copied from interface:PrimitiveIterableReturns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets.Assert.assertEquals("[]", IntLists.mutable.empty().toString()); Assert.assertEquals("[1]", IntLists.mutable.with(1).toString()); Assert.assertEquals("[1, 2, 3]", IntLists.mutable.with(1, 2, 3).toString());- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractLazyShortIterable- Returns:
- a string representation of this PrimitiveIterable
- See Also:
-
makeString
Description copied from interface:PrimitiveIterableReturns a string representation of this collection by delegating toPrimitiveIterable.makeString(String)and defaulting the separator parameter to the characters", "(comma and space).- Specified by:
makeStringin interfacePrimitiveIterable- Overrides:
makeStringin classAbstractLazyShortIterable- Returns:
- a string representation of this collection.
-
makeString
Description copied from interface:PrimitiveIterableReturns a string representation of this collection by delegating toPrimitiveIterable.makeString(String, String, String)and defaulting the start and end parameters to""(the empty String).- Specified by:
makeStringin interfacePrimitiveIterable- Overrides:
makeStringin classAbstractLazyShortIterable- Returns:
- a string representation of this collection.
-
makeString
Description copied from interface:PrimitiveIterableReturns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.- Specified by:
makeStringin interfacePrimitiveIterable- Overrides:
makeStringin classAbstractLazyShortIterable- Returns:
- a string representation of this collection.
-
appendString
Description copied from interface:PrimitiveIterablePrints a string representation of this collection onto the givenAppendable. Prints the string returned byPrimitiveIterable.makeString().- Specified by:
appendStringin interfacePrimitiveIterable- Overrides:
appendStringin classAbstractLazyShortIterable
-
appendString
Description copied from interface:PrimitiveIterablePrints a string representation of this collection onto the givenAppendable. Prints the string returned byPrimitiveIterable.makeString(String).- Specified by:
appendStringin interfacePrimitiveIterable- Overrides:
appendStringin classAbstractLazyShortIterable
-
appendString
Description copied from interface:PrimitiveIterablePrints a string representation of this collection onto the givenAppendable. Prints the string returned byPrimitiveIterable.makeString(String, String, String).- Specified by:
appendStringin interfacePrimitiveIterable- Overrides:
appendStringin classAbstractLazyShortIterable
-
contains
public boolean contains(short value) Description copied from interface:ShortIterableReturns true if the value is contained in the ShortIterable, and false if it is not.- Specified by:
containsin interfaceShortIterable- Overrides:
containsin classAbstractLazyShortIterable
-
containsAll
public boolean containsAll(short... source) Description copied from interface:ShortIterableReturns true if all of the values specified in the source array are contained in the ShortIterable, and false if they are not.- Specified by:
containsAllin interfaceShortIterable- Overrides:
containsAllin classAbstractLazyShortIterable
-
containsAll
Description copied from interface:ShortIterableReturns true if all of the values specified in the source ShortIterable are contained in the ShortIterable, and false if they are not.- Specified by:
containsAllin interfaceShortIterable- Overrides:
containsAllin classAbstractLazyShortIterable
-
toList
Description copied from interface:ShortIterableConverts the ShortIterable to a new MutableShortList.- Specified by:
toListin interfaceShortIterable- Overrides:
toListin classAbstractLazyShortIterable
-
toSet
Description copied from interface:ShortIterableConverts the ShortIterable to a new MutableShortSet.- Specified by:
toSetin interfaceShortIterable- Overrides:
toSetin classAbstractLazyShortIterable
-
toBag
Description copied from interface:ShortIterableConverts the ShortIterable to a new MutableShortBag.- Specified by:
toBagin interfaceShortIterable- Overrides:
toBagin classAbstractLazyShortIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectShortToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceShortIterable- Overrides:
injectIntoin classAbstractLazyShortIterable
-