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
public class LazyShortIterableAdapter extends AbstractLazyShortIterable
This file was automatically generated from template file lazyPrimitiveIterableAdapter.stg.
- Since:
- 3.0
-
Constructor Summary
Constructors Constructor Description LazyShortIterableAdapter(ShortIterable delegate)
-
Method Summary
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.void
appendString(Appendable appendable)
Prints a string representation of this collection onto the givenAppendable
.void
appendString(Appendable appendable, String separator)
Prints a string representation of this collection onto the givenAppendable
.void
appendString(Appendable appendable, String start, String separator, String end)
Prints a string representation of this collection onto the givenAppendable
.double
average()
boolean
contains(short value)
Returns true if the value is contained in the ShortIterable, and false if it is not.boolean
containsAll(short... source)
Returns true if the 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 the 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.short
detectIfNone(ShortPredicate predicate, short ifNone)
void
each(ShortProcedure procedure)
A synonym for forEach.<T> T
injectInto(T injectedValue, ObjectShortToObjectFunction<? super T,? extends T> function)
boolean
isEmpty()
Returns true if this iterable has zero items.String
makeString()
Returns a string representation of this collection by delegating toPrimitiveIterable.makeString(String)
and defaulting the separator parameter to the characters", "
(comma and space).String
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).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.short
max()
short
maxIfEmpty(short defaultValue)
double
median()
short
min()
short
minIfEmpty(short defaultValue)
boolean
noneSatisfy(ShortPredicate predicate)
Returns true if none of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.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.long
sum()
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()
MutableShortList
toSortedList()
String
toString()
Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets.Methods inherited from class org.eclipse.collections.impl.lazy.primitive.AbstractLazyShortIterable
asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, forEach, reject, select, tap
Methods inherited from class java.lang.Object
equals, 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, flatCollect, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toArray
-
Constructor Details
-
Method Details
-
shortIterator
Description copied from interface:ShortIterable
Returns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style. -
each
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
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
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
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
-
noneSatisfy
Description copied from interface:ShortIterable
Returns true if none of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfy
in interfaceShortIterable
- Overrides:
noneSatisfy
in classAbstractLazyShortIterable
-
detectIfNone
- Specified by:
detectIfNone
in interfaceShortIterable
- Overrides:
detectIfNone
in classAbstractLazyShortIterable
-
sum
public long sum()- Specified by:
sum
in interfaceShortIterable
- Overrides:
sum
in classAbstractLazyShortIterable
-
max
public short max()- Specified by:
max
in interfaceShortIterable
- Overrides:
max
in classAbstractLazyShortIterable
-
min
public short min()- Specified by:
min
in interfaceShortIterable
- Overrides:
min
in classAbstractLazyShortIterable
-
minIfEmpty
public short minIfEmpty(short defaultValue)- Specified by:
minIfEmpty
in interfaceShortIterable
- Overrides:
minIfEmpty
in classAbstractLazyShortIterable
-
maxIfEmpty
public short maxIfEmpty(short defaultValue)- Specified by:
maxIfEmpty
in interfaceShortIterable
- Overrides:
maxIfEmpty
in classAbstractLazyShortIterable
-
average
public double average()- Specified by:
average
in interfaceShortIterable
- Overrides:
average
in classAbstractLazyShortIterable
-
median
public double median()- Specified by:
median
in interfaceShortIterable
- Overrides:
median
in classAbstractLazyShortIterable
-
toSortedArray
public short[] toSortedArray()- Specified by:
toSortedArray
in interfaceShortIterable
- Overrides:
toSortedArray
in classAbstractLazyShortIterable
-
toSortedList
- Specified by:
toSortedList
in interfaceShortIterable
- Overrides:
toSortedList
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
-
toString
Description copied from interface:PrimitiveIterable
Returns 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:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classAbstractLazyShortIterable
- Returns:
- a string representation of this PrimitiveIterable
- See Also:
AbstractCollection.toString()
-
makeString
Description copied from interface:PrimitiveIterable
Returns a string representation of this collection by delegating toPrimitiveIterable.makeString(String)
and defaulting the separator parameter to the characters", "
(comma and space).- Specified by:
makeString
in interfacePrimitiveIterable
- Overrides:
makeString
in classAbstractLazyShortIterable
- Returns:
- a string representation of this collection.
-
makeString
Description copied from interface:PrimitiveIterable
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).- Specified by:
makeString
in interfacePrimitiveIterable
- Overrides:
makeString
in classAbstractLazyShortIterable
- Returns:
- a string representation of this collection.
-
makeString
Description copied from interface:PrimitiveIterable
Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.- Specified by:
makeString
in interfacePrimitiveIterable
- Overrides:
makeString
in classAbstractLazyShortIterable
- Returns:
- a string representation of this collection.
-
appendString
Description copied from interface:PrimitiveIterable
Prints a string representation of this collection onto the givenAppendable
. Prints the string returned byPrimitiveIterable.makeString()
.- Specified by:
appendString
in interfacePrimitiveIterable
- Overrides:
appendString
in classAbstractLazyShortIterable
-
appendString
Description copied from interface:PrimitiveIterable
Prints a string representation of this collection onto the givenAppendable
. Prints the string returned byPrimitiveIterable.makeString(String)
.- Specified by:
appendString
in interfacePrimitiveIterable
- Overrides:
appendString
in classAbstractLazyShortIterable
-
appendString
Description copied from interface:PrimitiveIterable
Prints a string representation of this collection onto the givenAppendable
. Prints the string returned byPrimitiveIterable.makeString(String, String, String)
.- Specified by:
appendString
in interfacePrimitiveIterable
- Overrides:
appendString
in classAbstractLazyShortIterable
-
contains
public boolean contains(short value)Description copied from interface:ShortIterable
Returns true if the value is contained in the ShortIterable, and false if it is not.- Specified by:
contains
in interfaceShortIterable
- Overrides:
contains
in classAbstractLazyShortIterable
-
containsAll
public boolean containsAll(short... source)Description copied from interface:ShortIterable
Returns true if the 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
Description copied from interface:ShortIterable
Returns true if the 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
-
toList
Description copied from interface:ShortIterable
Converts the ShortIterable to a new MutableShortList.- Specified by:
toList
in interfaceShortIterable
- Overrides:
toList
in classAbstractLazyShortIterable
-
toSet
Description copied from interface:ShortIterable
Converts the ShortIterable to a new MutableShortSet.- Specified by:
toSet
in interfaceShortIterable
- Overrides:
toSet
in classAbstractLazyShortIterable
-
toBag
Description copied from interface:ShortIterable
Converts the ShortIterable to a new MutableShortBag.- Specified by:
toBag
in interfaceShortIterable
- Overrides:
toBag
in classAbstractLazyShortIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectShortToObjectFunction<? super T,? extends T> function)- Specified by:
injectInto
in interfaceShortIterable
- Overrides:
injectInto
in classAbstractLazyShortIterable
-