Class CodePointAdapter
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractIntIterable
org.eclipse.collections.impl.string.immutable.CodePointAdapter
- All Implemented Interfaces:
Serializable,CharSequence,ImmutableIntCollection,IntIterable,ImmutableIntList,IntList,OrderedIntIterable,ReversibleIntIterable,PrimitiveIterable
public class CodePointAdapter
extends AbstractIntIterable
implements CharSequence, ImmutableIntList, Serializable
Calculates and provides the code points stored in a String as an ImmutableIntList. This is a cleaner more OO way of
providing many of the iterable protocols available in StringIterate for code points.
- Since:
- 7.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CodePointAdapterbooleanallSatisfy(IntPredicate predicate) booleananySatisfy(IntPredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) intbinarySearch(int value) charcharAt(int index) chunk(int size) <V> ImmutableList<V>collect(IntToObjectFunction<? extends V> function) collectInt(IntToIntFunction function) booleancontains(int expected) intcount(IntPredicate predicate) intdetectIfNone(IntPredicate predicate, int ifNone) distinct()longdotProduct(IntList list) voideach(IntProcedure procedure) booleanbooleanequalsIntList(IntList list) voidforEachWithIndex(IntIntProcedure procedure) static CodePointAdapterfrom(int... codePoints) static CodePointAdapterfrom(IntIterable iterable) intget(int index) intgetFirst()intgetLast()inthashCode()intindexOf(int value) <T> TinjectInto(T injectedValue, ObjectIntToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T, ? extends T> function) booleanisEmpty()intlastIndexOf(int value) intlength()intmax()intmin()newWith(int element) newWithAll(IntIterable elements) newWithout(int element) newWithoutAll(IntIterable elements) booleannoneSatisfy(IntPredicate predicate) reject(IntPredicate predicate) select(IntPredicate predicate) intsize()subList(int fromIndex, int toIndex) subSequence(int start, int end) longsum()int[]toArray()int[]toArray(int[] target) toBag()toList()toSet()toStack()toString()<T> ImmutableList<IntObjectPair<T>>zipInt(IntIterable iterable) Methods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toSortedArray, toSortedListMethods inherited from interface java.lang.CharSequence
chars, codePointsMethods inherited from interface org.eclipse.collections.api.list.primitive.ImmutableIntList
collectWithIndex, rejectWithIndex, selectWithIndex, tapMethods inherited from interface org.eclipse.collections.api.IntIterable
asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.list.primitive.IntList
forEachInBoth, primitiveParallelStream, primitiveStreamMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterable
collectWithIndex, rejectWithIndex, selectWithIndexMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, notEmpty
-
Constructor Details
-
CodePointAdapter
-
-
Method Details
-
adapt
-
from
-
from
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCharSequence- Specified by:
isEmptyin interfacePrimitiveIterable
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
toStringBuilder
-
toString
- Specified by:
toStringin interfaceCharSequence- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractIntIterable
-
intIterator
- Specified by:
intIteratorin interfaceIntIterable
-
toArray
public int[] toArray()- Specified by:
toArrayin interfaceIntIterable
-
toArray
public int[] toArray(int[] target) - Specified by:
toArrayin interfaceIntIterable
-
contains
public boolean contains(int expected) - Specified by:
containsin interfaceIntIterable
-
each
- Specified by:
eachin interfaceIntIterable
-
distinct
- Specified by:
distinctin interfaceImmutableIntList- Specified by:
distinctin interfaceIntList- Specified by:
distinctin interfaceReversibleIntIterable
-
newWith
- Specified by:
newWithin interfaceImmutableIntCollection- Specified by:
newWithin interfaceImmutableIntList
-
newWithout
- Specified by:
newWithoutin interfaceImmutableIntCollection- Specified by:
newWithoutin interfaceImmutableIntList
-
newWithAll
- Specified by:
newWithAllin interfaceImmutableIntCollection- Specified by:
newWithAllin interfaceImmutableIntList
-
newWithoutAll
- Specified by:
newWithoutAllin interfaceImmutableIntCollection- Specified by:
newWithoutAllin interfaceImmutableIntList
-
toReversed
- Specified by:
toReversedin interfaceImmutableIntList- Specified by:
toReversedin interfaceIntList- Specified by:
toReversedin interfaceReversibleIntIterable
-
subList
- Specified by:
subListin interfaceImmutableIntList- Specified by:
subListin interfaceIntList
-
get
public int get(int index) -
dotProduct
- Specified by:
dotProductin interfaceIntList
-
binarySearch
public int binarySearch(int value) - Specified by:
binarySearchin interfaceIntList
-
lastIndexOf
public int lastIndexOf(int value) - Specified by:
lastIndexOfin interfaceIntList
-
toImmutable
- Specified by:
toImmutablein interfaceIntList
-
getLast
public int getLast()- Specified by:
getLastin interfaceReversibleIntIterable
-
asReversed
- Specified by:
asReversedin interfaceReversibleIntIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedIntIterable- Specified by:
injectIntoWithIndexin interfaceReversibleIntIterable
-
getFirst
public int getFirst()- Specified by:
getFirstin interfaceOrderedIntIterable
-
indexOf
public int indexOf(int value) - Specified by:
indexOfin interfaceOrderedIntIterable
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedIntIterable
-
select
- Specified by:
selectin interfaceImmutableIntCollection- Specified by:
selectin interfaceImmutableIntList- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceIntList- Specified by:
selectin interfaceOrderedIntIterable- Specified by:
selectin interfaceReversibleIntIterable
-
reject
- Specified by:
rejectin interfaceImmutableIntCollection- Specified by:
rejectin interfaceImmutableIntList- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceIntList- Specified by:
rejectin interfaceOrderedIntIterable- Specified by:
rejectin interfaceReversibleIntIterable
-
collect
- Specified by:
collectin interfaceImmutableIntCollection- Specified by:
collectin interfaceImmutableIntList- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceIntList- Specified by:
collectin interfaceOrderedIntIterable- Specified by:
collectin interfaceReversibleIntIterable
-
collectInt
-
detectIfNone
- Specified by:
detectIfNonein interfaceIntIterable
-
count
- Specified by:
countin interfaceIntIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceIntIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceIntIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceIntIterable
-
toList
- Specified by:
toListin interfaceIntIterable- Overrides:
toListin classAbstractIntIterable
-
toSet
- Specified by:
toSetin interfaceIntIterable- Overrides:
toSetin classAbstractIntIterable
-
toBag
- Specified by:
toBagin interfaceIntIterable- Overrides:
toBagin classAbstractIntIterable
-
injectInto
- Specified by:
injectIntoin interfaceIntIterable
-
chunk
- Specified by:
chunkin interfaceIntIterable
-
sum
public long sum()- Specified by:
sumin interfaceIntIterable
-
max
public int max()- Specified by:
maxin interfaceIntIterable
-
min
public int min()- Specified by:
minin interfaceIntIterable
-
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
equals
-
equalsIntList
-
hashCode
public int hashCode() -
zipInt
- Specified by:
zipIntin interfaceImmutableIntList- Specified by:
zipIntin interfaceIntList- Since:
- 9.1.
-
zip
- Specified by:
zipin interfaceImmutableIntList- Specified by:
zipin interfaceIntList- Since:
- 9.1.
-
spliterator
- Specified by:
spliteratorin interfaceIntList
-
toStack
- Specified by:
toStackin interfaceOrderedIntIterable
-