Class AbstractLazyCharIterable
- java.lang.Object
-
- org.eclipse.collections.impl.lazy.primitive.AbstractLazyCharIterable
-
- All Implemented Interfaces:
CharIterable
,LazyCharIterable
,PrimitiveIterable
- Direct Known Subclasses:
CharBooleanHashMap.KeysView
,CharByteHashMap.KeysView
,CharCharHashMap.KeysView
,CharDoubleHashMap.KeysView
,CharFloatHashMap.KeysView
,CharIntHashMap.KeysView
,CharLongHashMap.KeysView
,CharObjectHashMap.KeysView
,CharShortHashMap.KeysView
,CollectBooleanToCharIterable
,CollectByteToCharIterable
,CollectCharIterable
,CollectCharToCharIterable
,CollectDoubleToCharIterable
,CollectFloatToCharIterable
,CollectIntToCharIterable
,CollectLongToCharIterable
,CollectShortToCharIterable
,LazyCharIterableAdapter
,ReverseCharIterable
,SelectCharIterable
,TapCharIterable
public abstract class AbstractLazyCharIterable extends java.lang.Object implements LazyCharIterable
This file was automatically generated from template file abstractLazyPrimitiveIterable.stg.- Since:
- 5.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
AbstractLazyCharIterable.CharMaxProcedure
private static class
AbstractLazyCharIterable.CharMinProcedure
private static class
AbstractLazyCharIterable.CharSumProcedure
-
Constructor Summary
Constructors Constructor Description AbstractLazyCharIterable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSatisfy(CharPredicate predicate)
Returns true if all of the elements in the CharIterable return true for the specified predicate, otherwise returns false.boolean
anySatisfy(CharPredicate predicate)
Returns true if any of the elements in the CharIterable return true for the specified predicate, otherwise returns false.void
appendString(java.lang.Appendable appendable)
Prints a string representation of this collection onto the givenAppendable
.void
appendString(java.lang.Appendable appendable, java.lang.String separator)
Prints a string representation of this collection onto the givenAppendable
.void
appendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)
Prints a string representation of this collection onto the givenAppendable
.LazyCharIterable
asLazy()
Returns a LazyCharIterable adapter wrapping the source CharIterable.double
average()
RichIterable<CharIterable>
chunk(int size)
Partitions elements in fixed size chunks.<V> LazyIterable<V>
collect(CharToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.LazyBooleanIterable
collectBoolean(CharToBooleanFunction function)
LazyByteIterable
collectByte(CharToByteFunction function)
LazyCharIterable
collectChar(CharToCharFunction function)
LazyDoubleIterable
collectDouble(CharToDoubleFunction function)
LazyFloatIterable
collectFloat(CharToFloatFunction function)
LazyIntIterable
collectInt(CharToIntFunction function)
LazyLongIterable
collectLong(CharToLongFunction function)
LazyShortIterable
collectShort(CharToShortFunction function)
boolean
contains(char value)
Returns true if the value is contained in the CharIterable, and false if it is not.boolean
containsAll(char... source)
Returns true if all of the values specified in the source array are contained in the CharIterable, and false if they are not.boolean
containsAll(CharIterable source)
Returns true if all of the values specified in the source CharIterable are contained in the CharIterable, and false if they are not.int
count(CharPredicate predicate)
Returns a count of the number of elements in the CharIterable that return true for the specified predicate.char
detectIfNone(CharPredicate predicate, char ifNone)
<V> LazyIterable<V>
flatCollect(CharToObjectFunction<? extends java.lang.Iterable<V>> function)
<T> T
injectInto(T injectedValue, ObjectCharToObjectFunction<? super T,? extends T> function)
boolean
isEmpty()
Returns true if this iterable has zero items.java.lang.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).java.lang.String
makeString(java.lang.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).java.lang.String
makeString(java.lang.String start, java.lang.String separator, java.lang.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.char
max()
char
maxIfEmpty(char ifEmpty)
double
median()
char
min()
char
minIfEmpty(char ifEmpty)
boolean
noneSatisfy(CharPredicate predicate)
Returns true if none of the elements in the CharIterable return true for the specified predicate, otherwise returns false.boolean
notEmpty()
The English equivalent of !this.isEmpty()LazyCharIterable
reject(CharPredicate predicate)
Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.LazyCharIterable
select(CharPredicate predicate)
Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.int
size()
Returns the number of items in this iterable.long
sum()
LazyCharIterable
tap(CharProcedure procedure)
char[]
toArray()
Converts the CharIterable to a primitive char array.MutableCharBag
toBag()
Converts the CharIterable to a new MutableCharBag.MutableCharList
toList()
Converts the CharIterable to a new MutableCharList.MutableCharSet
toSet()
Converts the CharIterable to a new MutableCharSet.char[]
toSortedArray()
MutableCharList
toSortedList()
java.lang.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.CharIterable
averageIfEmpty, charIterator, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, each, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toArray, toSortedList, toSortedListBy, toSortedListBy
-
-
-
-
Method Detail
-
size
public int size()
Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in interfacePrimitiveIterable
-
toString
public java.lang.String 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 classjava.lang.Object
- Returns:
- a string representation of this PrimitiveIterable
- See Also:
AbstractCollection.toString()
-
isEmpty
public boolean isEmpty()
Description copied from interface:PrimitiveIterable
Returns true if this iterable has zero items.- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
Description copied from interface:PrimitiveIterable
The English equivalent of !this.isEmpty()- Specified by:
notEmpty
in interfacePrimitiveIterable
-
makeString
public java.lang.String 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
- Returns:
- a string representation of this collection.
-
makeString
public java.lang.String makeString(java.lang.String separator)
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
- Returns:
- a string representation of this collection.
-
makeString
public java.lang.String makeString(java.lang.String start, java.lang.String separator, java.lang.String end)
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
- Returns:
- a string representation of this collection.
-
appendString
public void appendString(java.lang.Appendable appendable)
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
-
appendString
public void appendString(java.lang.Appendable appendable, java.lang.String separator)
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
-
appendString
public void appendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)
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
-
contains
public boolean contains(char value)
Description copied from interface:CharIterable
Returns true if the value is contained in the CharIterable, and false if it is not.- Specified by:
contains
in interfaceCharIterable
-
containsAll
public boolean containsAll(char... source)
Description copied from interface:CharIterable
Returns true if all of the values specified in the source array are contained in the CharIterable, and false if they are not.- Specified by:
containsAll
in interfaceCharIterable
-
containsAll
public boolean containsAll(CharIterable source)
Description copied from interface:CharIterable
Returns true if all of the values specified in the source CharIterable are contained in the CharIterable, and false if they are not.- Specified by:
containsAll
in interfaceCharIterable
-
select
public LazyCharIterable select(CharPredicate predicate)
Description copied from interface:CharIterable
Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.- Specified by:
select
in interfaceCharIterable
- Specified by:
select
in interfaceLazyCharIterable
-
reject
public LazyCharIterable reject(CharPredicate predicate)
Description copied from interface:CharIterable
Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.- Specified by:
reject
in interfaceCharIterable
- Specified by:
reject
in interfaceLazyCharIterable
-
tap
public LazyCharIterable tap(CharProcedure procedure)
- Specified by:
tap
in interfaceCharIterable
- Specified by:
tap
in interfaceLazyCharIterable
-
collect
public <V> LazyIterable<V> collect(CharToObjectFunction<? extends V> function)
Description copied from interface:CharIterable
Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collect
in interfaceCharIterable
- Specified by:
collect
in interfaceLazyCharIterable
-
flatCollect
public <V> LazyIterable<V> flatCollect(CharToObjectFunction<? extends java.lang.Iterable<V>> function)
- Specified by:
flatCollect
in interfaceLazyCharIterable
-
collectBoolean
public LazyBooleanIterable collectBoolean(CharToBooleanFunction function)
- Specified by:
collectBoolean
in interfaceLazyCharIterable
- Since:
- 7.0
-
collectByte
public LazyByteIterable collectByte(CharToByteFunction function)
- Specified by:
collectByte
in interfaceLazyCharIterable
- Since:
- 7.0
-
collectChar
public LazyCharIterable collectChar(CharToCharFunction function)
- Specified by:
collectChar
in interfaceLazyCharIterable
- Since:
- 7.0
-
collectShort
public LazyShortIterable collectShort(CharToShortFunction function)
- Specified by:
collectShort
in interfaceLazyCharIterable
- Since:
- 7.0
-
collectInt
public LazyIntIterable collectInt(CharToIntFunction function)
- Specified by:
collectInt
in interfaceLazyCharIterable
- Since:
- 7.0
-
collectFloat
public LazyFloatIterable collectFloat(CharToFloatFunction function)
- Specified by:
collectFloat
in interfaceLazyCharIterable
- Since:
- 7.0
-
collectLong
public LazyLongIterable collectLong(CharToLongFunction function)
- Specified by:
collectLong
in interfaceLazyCharIterable
- Since:
- 7.0
-
collectDouble
public LazyDoubleIterable collectDouble(CharToDoubleFunction function)
- Specified by:
collectDouble
in interfaceLazyCharIterable
- Since:
- 7.0
-
detectIfNone
public char detectIfNone(CharPredicate predicate, char ifNone)
- Specified by:
detectIfNone
in interfaceCharIterable
-
count
public int count(CharPredicate predicate)
Description copied from interface:CharIterable
Returns a count of the number of elements in the CharIterable that return true for the specified predicate.- Specified by:
count
in interfaceCharIterable
-
anySatisfy
public boolean anySatisfy(CharPredicate predicate)
Description copied from interface:CharIterable
Returns true if any of the elements in the CharIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceCharIterable
-
allSatisfy
public boolean allSatisfy(CharPredicate predicate)
Description copied from interface:CharIterable
Returns true if all of the elements in the CharIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceCharIterable
-
noneSatisfy
public boolean noneSatisfy(CharPredicate predicate)
Description copied from interface:CharIterable
Returns true if none of the elements in the CharIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfy
in interfaceCharIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectCharToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceCharIterable
-
chunk
public RichIterable<CharIterable> chunk(int size)
Description copied from interface:CharIterable
Partitions elements in fixed size chunks.- Specified by:
chunk
in interfaceCharIterable
- Parameters:
size
- the number of elements per chunk- Returns:
- A
RichIterable
containingCharIterable
s of sizesize
, except the last will be truncated if the elements don't divide evenly.
-
toArray
public char[] toArray()
Description copied from interface:CharIterable
Converts the CharIterable to a primitive char array.- Specified by:
toArray
in interfaceCharIterable
-
toList
public MutableCharList toList()
Description copied from interface:CharIterable
Converts the CharIterable to a new MutableCharList.- Specified by:
toList
in interfaceCharIterable
-
toSet
public MutableCharSet toSet()
Description copied from interface:CharIterable
Converts the CharIterable to a new MutableCharSet.- Specified by:
toSet
in interfaceCharIterable
-
toBag
public MutableCharBag toBag()
Description copied from interface:CharIterable
Converts the CharIterable to a new MutableCharBag.- Specified by:
toBag
in interfaceCharIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceCharIterable
-
max
public char max()
- Specified by:
max
in interfaceCharIterable
-
maxIfEmpty
public char maxIfEmpty(char ifEmpty)
- Specified by:
maxIfEmpty
in interfaceCharIterable
-
min
public char min()
- Specified by:
min
in interfaceCharIterable
-
minIfEmpty
public char minIfEmpty(char ifEmpty)
- Specified by:
minIfEmpty
in interfaceCharIterable
-
average
public double average()
- Specified by:
average
in interfaceCharIterable
-
median
public double median()
- Specified by:
median
in interfaceCharIterable
-
toSortedArray
public char[] toSortedArray()
- Specified by:
toSortedArray
in interfaceCharIterable
-
toSortedList
public MutableCharList toSortedList()
- Specified by:
toSortedList
in interfaceCharIterable
-
asLazy
public LazyCharIterable asLazy()
Description copied from interface:CharIterable
Returns a LazyCharIterable adapter wrapping the source CharIterable.- Specified by:
asLazy
in interfaceCharIterable
-
-