Serializable
, CharSequence
, ImmutableIntCollection
, IntIterable
, ImmutableIntList
, IntList
, OrderedIntIterable
, ReversibleIntIterable
, PrimitiveIterable
public class CodePointList extends AbstractIntIterable implements CharSequence, ImmutableIntList, Serializable
Constructor | Description |
---|---|
CodePointList(String value) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
allSatisfy(IntPredicate predicate) |
Returns true if all of the elements in the IntIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
anySatisfy(IntPredicate predicate) |
Returns true if any of the elements in the IntIterable return true for the
specified predicate, otherwise returns false.
|
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
Prints a string representation of this collection onto the given
Appendable . |
LazyIntIterable |
asReversed() |
|
int |
binarySearch(int value) |
|
char |
charAt(int index) |
|
RichIterable<IntIterable> |
chunk(int size) |
Partitions elements in fixed size chunks.
|
<V> ImmutableList<V> |
collect(IntToObjectFunction<? extends V> function) |
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
CodePointList |
collectInt(IntToIntFunction function) |
|
boolean |
contains(int expected) |
Returns true if the value is contained in the IntIterable, and false if it is not.
|
int |
count(IntPredicate predicate) |
Returns a count of the number of elements in the IntIterable that return true for the
specified predicate.
|
int |
detectIfNone(IntPredicate predicate,
int ifNone) |
|
CodePointList |
distinct() |
|
long |
dotProduct(IntList list) |
|
void |
each(IntProcedure procedure) |
A synonym for forEach.
|
boolean |
equals(Object otherList) |
Follows the same general contract as
List.equals(Object) . |
void |
forEach(IntProcedure procedure) |
Applies the IntProcedure to each element in the IntIterable.
|
void |
forEachWithIndex(IntIntProcedure procedure) |
|
static CodePointList |
from(int... codePoints) |
|
static CodePointList |
from(String value) |
|
static CodePointList |
from(IntIterable iterable) |
|
int |
get(int index) |
|
int |
getFirst() |
|
int |
getLast() |
|
int |
hashCode() |
Follows the same general contract as
List.hashCode() . |
int |
indexOf(int value) |
|
<T> T |
injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function) |
|
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectIntIntToObjectFunction<? super T,? extends T> function) |
|
IntIterator |
intIterator() |
Returns a primitive iterator that can be used to iterate over the IntIterable in an
imperative style.
|
int |
lastIndexOf(int value) |
|
int |
length() |
|
int |
max() |
|
int |
min() |
|
CodePointList |
newWith(int element) |
|
CodePointList |
newWithAll(IntIterable elements) |
|
CodePointList |
newWithout(int element) |
|
CodePointList |
newWithoutAll(IntIterable elements) |
|
boolean |
noneSatisfy(IntPredicate predicate) |
Returns true if none of the elements in the IntIterable return true for the
specified predicate, otherwise returns false.
|
CodePointList |
reject(IntPredicate predicate) |
Returns a new IntIterable with all of the elements in the IntIterable that
return false for the specified predicate.
|
CodePointList |
select(IntPredicate predicate) |
Returns a new IntIterable with all of the elements in the IntIterable that
return true for the specified predicate.
|
int |
size() |
Returns the number of items in this iterable.
|
Spliterator.OfInt |
spliterator() |
|
ImmutableIntList |
subList(int fromIndex,
int toIndex) |
|
String |
subSequence(int start,
int end) |
|
long |
sum() |
|
int[] |
toArray() |
Converts the IntIterable to a primitive int array.
|
MutableIntBag |
toBag() |
Converts the IntIterable to a new MutableIntBag.
|
ImmutableIntList |
toImmutable() |
Returns an immutable copy of this list.
|
MutableIntList |
toList() |
Converts the IntIterable to a new MutableIntList.
|
CodePointList |
toReversed() |
|
MutableIntSet |
toSet() |
Converts the IntIterable to a new MutableIntSet.
|
String |
toString() |
The value of toString must be strictly implemented as defined in CharSequence.
|
StringBuilder |
toStringBuilder() |
|
<T> ImmutableList<IntObjectPair<T>> |
zip(Iterable<T> iterable) |
Returns an
ImmutableList formed from this ImmutableIntList and a ListIterable by
combining corresponding elements in pairs. |
ImmutableList<IntIntPair> |
zipInt(IntIterable iterable) |
Returns an
ImmutableList formed from this ImmutableIntList and another IntList by
combining corresponding elements in pairs. |
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toSortedArray, toSortedList
chars, codePoints
collectWithIndex, tap
asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, flatCollect, maxIfEmpty, median, medianIfEmpty, minIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toSortedArray, toSortedList
primitiveParallelStream, primitiveStream
collectWithIndex
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty
public CodePointList(String value)
public static CodePointList from(String value)
public static CodePointList from(int... codePoints)
public static CodePointList from(IntIterable iterable)
public StringBuilder toStringBuilder()
public char charAt(int index)
charAt
in interface CharSequence
public int length()
length
in interface CharSequence
public String subSequence(int start, int end)
subSequence
in interface CharSequence
public String toString()
toString
in interface CharSequence
toString
in interface PrimitiveIterable
toString
in class AbstractIntIterable
AbstractCollection.toString()
public IntIterator intIterator()
IntIterable
intIterator
in interface IntIterable
public int[] toArray()
IntIterable
toArray
in interface IntIterable
public boolean contains(int expected)
IntIterable
contains
in interface IntIterable
public void forEach(IntProcedure procedure)
IntIterable
forEach
in interface IntIterable
public void each(IntProcedure procedure)
IntIterable
each
in interface IntIterable
public CodePointList distinct()
distinct
in interface ImmutableIntList
distinct
in interface IntList
distinct
in interface ReversibleIntIterable
public CodePointList newWith(int element)
newWith
in interface ImmutableIntCollection
newWith
in interface ImmutableIntList
public CodePointList newWithout(int element)
newWithout
in interface ImmutableIntCollection
newWithout
in interface ImmutableIntList
public CodePointList newWithAll(IntIterable elements)
newWithAll
in interface ImmutableIntCollection
newWithAll
in interface ImmutableIntList
public CodePointList newWithoutAll(IntIterable elements)
newWithoutAll
in interface ImmutableIntCollection
newWithoutAll
in interface ImmutableIntList
public CodePointList toReversed()
toReversed
in interface ImmutableIntList
toReversed
in interface IntList
toReversed
in interface ReversibleIntIterable
public ImmutableIntList subList(int fromIndex, int toIndex)
subList
in interface ImmutableIntList
subList
in interface IntList
List.subList(int fromIndex, int toIndex)
public long dotProduct(IntList list)
dotProduct
in interface IntList
public int binarySearch(int value)
binarySearch
in interface IntList
public int lastIndexOf(int value)
lastIndexOf
in interface IntList
public ImmutableIntList toImmutable()
IntList
toImmutable
in interface IntList
public int getLast()
getLast
in interface ReversibleIntIterable
public LazyIntIterable asReversed()
asReversed
in interface ReversibleIntIterable
public <T> T injectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex
in interface OrderedIntIterable
injectIntoWithIndex
in interface ReversibleIntIterable
public int getFirst()
getFirst
in interface OrderedIntIterable
public int indexOf(int value)
indexOf
in interface OrderedIntIterable
public void forEachWithIndex(IntIntProcedure procedure)
forEachWithIndex
in interface OrderedIntIterable
public CodePointList select(IntPredicate predicate)
IntIterable
select
in interface ImmutableIntCollection
select
in interface ImmutableIntList
select
in interface IntIterable
select
in interface IntList
select
in interface OrderedIntIterable
select
in interface ReversibleIntIterable
public CodePointList reject(IntPredicate predicate)
IntIterable
reject
in interface ImmutableIntCollection
reject
in interface ImmutableIntList
reject
in interface IntIterable
reject
in interface IntList
reject
in interface OrderedIntIterable
reject
in interface ReversibleIntIterable
public <V> ImmutableList<V> collect(IntToObjectFunction<? extends V> function)
IntIterable
collect
in interface ImmutableIntCollection
collect
in interface ImmutableIntList
collect
in interface IntIterable
collect
in interface IntList
collect
in interface OrderedIntIterable
collect
in interface ReversibleIntIterable
public CodePointList collectInt(IntToIntFunction function)
public int detectIfNone(IntPredicate predicate, int ifNone)
detectIfNone
in interface IntIterable
public int count(IntPredicate predicate)
IntIterable
count
in interface IntIterable
public boolean anySatisfy(IntPredicate predicate)
IntIterable
anySatisfy
in interface IntIterable
public boolean allSatisfy(IntPredicate predicate)
IntIterable
allSatisfy
in interface IntIterable
public boolean noneSatisfy(IntPredicate predicate)
IntIterable
noneSatisfy
in interface IntIterable
public MutableIntList toList()
IntIterable
toList
in interface IntIterable
toList
in class AbstractIntIterable
public MutableIntSet toSet()
IntIterable
toSet
in interface IntIterable
toSet
in class AbstractIntIterable
public MutableIntBag toBag()
IntIterable
toBag
in interface IntIterable
toBag
in class AbstractIntIterable
public <T> T injectInto(T injectedValue, ObjectIntToObjectFunction<? super T,? extends T> function)
injectInto
in interface IntIterable
public RichIterable<IntIterable> chunk(int size)
IntIterable
chunk
in interface IntIterable
size
- the number of elements per chunkRichIterable
containing IntIterable
s of size size
, except the last will be
truncated if the elements don't divide evenly.public long sum()
sum
in interface IntIterable
public int max()
max
in interface IntIterable
public int min()
min
in interface IntIterable
public int size()
PrimitiveIterable
size
in interface PrimitiveIterable
public void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterable
Appendable
. Prints the string returned
by PrimitiveIterable.makeString(String, String, String)
.appendString
in interface PrimitiveIterable
public boolean equals(Object otherList)
IntList
List.equals(Object)
.public int hashCode()
IntList
List.hashCode()
.public ImmutableList<IntIntPair> zipInt(IntIterable iterable)
ImmutableIntList
ImmutableList
formed from this ImmutableIntList
and another IntList
by
combining corresponding elements in pairs. If one of the two IntList
s is longer than the other, its
remaining elements are ignored.zipInt
in interface ImmutableIntList
zipInt
in interface IntList
public <T> ImmutableList<IntObjectPair<T>> zip(Iterable<T> iterable)
ImmutableIntList
ImmutableList
formed from this ImmutableIntList
and a ListIterable
by
combining corresponding elements in pairs. If one of the two Lists is longer than the other, its
remaining elements are ignored.zip
in interface ImmutableIntList
zip
in interface IntList
public Spliterator.OfInt spliterator()
spliterator
in interface IntList
Copyright © 2004–2019. All rights reserved.