Class LazyByteIterableAdapter
java.lang.Object
org.eclipse.collections.impl.lazy.primitive.AbstractLazyByteIterable
org.eclipse.collections.impl.lazy.primitive.LazyByteIterableAdapter
- All Implemented Interfaces:
ByteIterable
,LazyByteIterable
,PrimitiveIterable
public class LazyByteIterableAdapter extends AbstractLazyByteIterable
This file was automatically generated from template file lazyPrimitiveIterableAdapter.stg.
- Since:
- 3.0
-
Constructor Summary
Constructors Constructor Description LazyByteIterableAdapter(ByteIterable delegate)
-
Method Summary
Modifier and Type Method Description boolean
allSatisfy(BytePredicate predicate)
Returns true if all of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.boolean
anySatisfy(BytePredicate predicate)
Returns true if any of the elements in the ByteIterable 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()
ByteIterator
byteIterator()
Returns a primitive iterator that can be used to iterate over the ByteIterable in an imperative style.boolean
contains(byte value)
Returns true if the value is contained in the ByteIterable, and false if it is not.boolean
containsAll(byte... source)
Returns true if the all of the values specified in the source array are contained in the ByteIterable, and false if they are not.boolean
containsAll(ByteIterable source)
Returns true if the all of the values specified in the source ByteIterable are contained in the ByteIterable, and false if they are not.int
count(BytePredicate predicate)
Returns a count of the number of elements in the ByteIterable that return true for the specified predicate.byte
detectIfNone(BytePredicate predicate, byte ifNone)
void
each(ByteProcedure procedure)
A synonym for forEach.<T> T
injectInto(T injectedValue, ObjectByteToObjectFunction<? 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.byte
max()
byte
maxIfEmpty(byte defaultValue)
double
median()
byte
min()
byte
minIfEmpty(byte defaultValue)
boolean
noneSatisfy(BytePredicate predicate)
Returns true if none of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.boolean
notEmpty()
The English equivalent of !this.isEmpty()int
size()
Returns the number of items in this iterable.long
sum()
byte[]
toArray()
Converts the ByteIterable to a primitive byte array.MutableByteBag
toBag()
Converts the ByteIterable to a new MutableByteBag.MutableByteList
toList()
Converts the ByteIterable to a new MutableByteList.MutableByteSet
toSet()
Converts the ByteIterable to a new MutableByteSet.byte[]
toSortedArray()
MutableByteList
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.AbstractLazyByteIterable
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.ByteIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toArray
-
Constructor Details
-
Method Details
-
byteIterator
Description copied from interface:ByteIterable
Returns a primitive iterator that can be used to iterate over the ByteIterable in an imperative style. -
each
Description copied from interface:ByteIterable
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 classAbstractLazyByteIterable
-
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 classAbstractLazyByteIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterable
The English equivalent of !this.isEmpty()- Specified by:
notEmpty
in interfacePrimitiveIterable
- Overrides:
notEmpty
in classAbstractLazyByteIterable
-
count
Description copied from interface:ByteIterable
Returns a count of the number of elements in the ByteIterable that return true for the specified predicate.- Specified by:
count
in interfaceByteIterable
- Overrides:
count
in classAbstractLazyByteIterable
-
anySatisfy
Description copied from interface:ByteIterable
Returns true if any of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceByteIterable
- Overrides:
anySatisfy
in classAbstractLazyByteIterable
-
allSatisfy
Description copied from interface:ByteIterable
Returns true if all of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceByteIterable
- Overrides:
allSatisfy
in classAbstractLazyByteIterable
-
noneSatisfy
Description copied from interface:ByteIterable
Returns true if none of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfy
in interfaceByteIterable
- Overrides:
noneSatisfy
in classAbstractLazyByteIterable
-
detectIfNone
- Specified by:
detectIfNone
in interfaceByteIterable
- Overrides:
detectIfNone
in classAbstractLazyByteIterable
-
sum
public long sum()- Specified by:
sum
in interfaceByteIterable
- Overrides:
sum
in classAbstractLazyByteIterable
-
max
public byte max()- Specified by:
max
in interfaceByteIterable
- Overrides:
max
in classAbstractLazyByteIterable
-
min
public byte min()- Specified by:
min
in interfaceByteIterable
- Overrides:
min
in classAbstractLazyByteIterable
-
minIfEmpty
public byte minIfEmpty(byte defaultValue)- Specified by:
minIfEmpty
in interfaceByteIterable
- Overrides:
minIfEmpty
in classAbstractLazyByteIterable
-
maxIfEmpty
public byte maxIfEmpty(byte defaultValue)- Specified by:
maxIfEmpty
in interfaceByteIterable
- Overrides:
maxIfEmpty
in classAbstractLazyByteIterable
-
average
public double average()- Specified by:
average
in interfaceByteIterable
- Overrides:
average
in classAbstractLazyByteIterable
-
median
public double median()- Specified by:
median
in interfaceByteIterable
- Overrides:
median
in classAbstractLazyByteIterable
-
toSortedArray
public byte[] toSortedArray()- Specified by:
toSortedArray
in interfaceByteIterable
- Overrides:
toSortedArray
in classAbstractLazyByteIterable
-
toSortedList
- Specified by:
toSortedList
in interfaceByteIterable
- Overrides:
toSortedList
in classAbstractLazyByteIterable
-
toArray
public byte[] toArray()Description copied from interface:ByteIterable
Converts the ByteIterable to a primitive byte array.- Specified by:
toArray
in interfaceByteIterable
- Overrides:
toArray
in classAbstractLazyByteIterable
-
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 classAbstractLazyByteIterable
- 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 classAbstractLazyByteIterable
- 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 classAbstractLazyByteIterable
- 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 classAbstractLazyByteIterable
- 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 classAbstractLazyByteIterable
-
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 classAbstractLazyByteIterable
-
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 classAbstractLazyByteIterable
-
contains
public boolean contains(byte value)Description copied from interface:ByteIterable
Returns true if the value is contained in the ByteIterable, and false if it is not.- Specified by:
contains
in interfaceByteIterable
- Overrides:
contains
in classAbstractLazyByteIterable
-
containsAll
public boolean containsAll(byte... source)Description copied from interface:ByteIterable
Returns true if the all of the values specified in the source array are contained in the ByteIterable, and false if they are not.- Specified by:
containsAll
in interfaceByteIterable
- Overrides:
containsAll
in classAbstractLazyByteIterable
-
containsAll
Description copied from interface:ByteIterable
Returns true if the all of the values specified in the source ByteIterable are contained in the ByteIterable, and false if they are not.- Specified by:
containsAll
in interfaceByteIterable
- Overrides:
containsAll
in classAbstractLazyByteIterable
-
toList
Description copied from interface:ByteIterable
Converts the ByteIterable to a new MutableByteList.- Specified by:
toList
in interfaceByteIterable
- Overrides:
toList
in classAbstractLazyByteIterable
-
toSet
Description copied from interface:ByteIterable
Converts the ByteIterable to a new MutableByteSet.- Specified by:
toSet
in interfaceByteIterable
- Overrides:
toSet
in classAbstractLazyByteIterable
-
toBag
Description copied from interface:ByteIterable
Converts the ByteIterable to a new MutableByteBag.- Specified by:
toBag
in interfaceByteIterable
- Overrides:
toBag
in classAbstractLazyByteIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectByteToObjectFunction<? super T,? extends T> function)- Specified by:
injectInto
in interfaceByteIterable
- Overrides:
injectInto
in classAbstractLazyByteIterable
-