Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.string.immutable

public Class CodePointAdapter

extends AbstractIntIterable
implements CharSequence, ImmutableIntList, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.eclipse.collections.api.list.primitive.ImmutableIntList, org.eclipse.collections.api.list.primitive.IntList, org.eclipse.collections.api.ordered.primitive.ReversibleIntIterable, org.eclipse.collections.api.ordered.primitive.OrderedIntIterable, org.eclipse.collections.api.IntIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.ImmutableIntCollection, java.lang.CharSequence
Imports
java.io.IOException, .Serializable, java.util.Iterator, .NoSuchElementException, .Spliterator, org.eclipse.collections.api.IntIterable, .LazyIntIterable, .RichIterable, org.eclipse.collections.api.bag.primitive.MutableIntBag, org.eclipse.collections.api.block.function.primitive.IntToIntFunction, .IntToObjectFunction, .ObjectIntIntToObjectFunction, .ObjectIntToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, org.eclipse.collections.api.block.procedure.primitive.IntIntProcedure, .IntProcedure, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.factory.primitive.IntBags, .IntLists, .IntSets, org.eclipse.collections.api.iterator.IntIterator, org.eclipse.collections.api.list.ImmutableList, .MutableList, org.eclipse.collections.api.list.primitive.ImmutableIntList, .IntList, .MutableIntList, org.eclipse.collections.api.set.primitive.MutableIntSet, org.eclipse.collections.api.stack.primitive.MutableIntStack, org.eclipse.collections.api.tuple.primitive.IntIntPair, .IntObjectPair, org.eclipse.collections.impl.factory.primitive.IntStacks, org.eclipse.collections.impl.lazy.primitive.ReverseIntIterable, org.eclipse.collections.impl.list.mutable.FastList, org.eclipse.collections.impl.primitive.AbstractIntIterable, org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples, org.eclipse.collections.impl.utility.Iterate

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final String
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static CodePointAdapter
adapt(String value)

public boolean
allSatisfy(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.allSatisfy.

Returns true if all of the elements in the IntIterable return true for the specified predicate, otherwise returns false.

public boolean
anySatisfy(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.anySatisfy.

Returns true if any of the elements in the IntIterable return true for the specified predicate, otherwise returns false.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public LazyIntIterable
public int
public char
charAt(int index)

Implements java.lang.CharSequence.charAt.

Returns the char value at the specified index.

public RichIterable<IntIterable>
chunk(int size)

Overrides default org.eclipse.collections.api.IntIterable.chunk.

Partitions elements in fixed size chunks.

public <V> ImmutableList<V>
collect(IntToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.collect, org.eclipse.collections.api.IntIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public CodePointAdapter
public boolean
contains(int expected)

Implements org.eclipse.collections.api.IntIterable.contains.

Returns true if the value is contained in the IntIterable, and false if it is not.

public int
count(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.count.

Returns a count of the number of elements in the IntIterable that return true for the specified predicate.

public int
public CodePointAdapter
public long
public void
each(IntProcedure procedure)

Implements org.eclipse.collections.api.IntIterable.each.

A synonym for forEach.

public boolean
private boolean
public boolean
public void
public static CodePointAdapter
from(int... codePoints)

public static CodePointAdapter
from(IntIterable iterable)

public int
public int
public int
public int
public int
public <T> T
injectInto(T injectedValue, ObjectIntToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.IntIterable.injectInto.

public <T> T
public IntIterator
intIterator()

Implements org.eclipse.collections.api.IntIterable.intIterator.

Returns a primitive iterator that can be used to iterate over the IntIterable in an imperative style.

public boolean
isEmpty()

Overrides default java.lang.CharSequence.isEmpty, org.eclipse.collections.api.PrimitiveIterable.isEmpty.

Returns true if this character sequence is empty.

public int
public int
length()

Implements java.lang.CharSequence.length.

Returns the length of this character sequence.

public int
public int
public CodePointAdapter
public CodePointAdapter
public CodePointAdapter
public CodePointAdapter
public boolean
noneSatisfy(IntPredicate predicate)

Overrides default org.eclipse.collections.api.IntIterable.noneSatisfy.

Returns true if none of the elements in the IntIterable return true for the specified predicate, otherwise returns false.

public CodePointAdapter
reject(IntPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.reject, org.eclipse.collections.api.IntIterable.reject.

Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.

public CodePointAdapter
select(IntPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.select, org.eclipse.collections.api.IntIterable.select.

Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.

public int
size()

Implements org.eclipse.collections.api.PrimitiveIterable.size.

Returns the number of items in this iterable.

public Spliterator.OfInt
public ImmutableIntList
public String
subSequence(int start, int end)

Implements java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence.

public long
public int[]
toArray()

Implements org.eclipse.collections.api.IntIterable.toArray.

Converts the IntIterable to a primitive int array.

public int[]
toArray(int[] target)

Overrides default org.eclipse.collections.api.IntIterable.toArray.

Converts the IntIterable to a primitive int array.

public MutableIntBag
toBag()

Overrides org.eclipse.collections.impl.primitive.AbstractIntIterable.toBag.

Implements org.eclipse.collections.api.IntIterable.toBag.

Converts the IntIterable to a new MutableIntBag.

public ImmutableIntList
toImmutable()

Implements org.eclipse.collections.api.list.primitive.IntList.toImmutable.

Returns an immutable copy of this list.

public MutableIntList
public CodePointAdapter
public MutableIntSet
toSet()

Overrides org.eclipse.collections.impl.primitive.AbstractIntIterable.toSet.

Implements org.eclipse.collections.api.IntIterable.toSet.

Converts the IntIterable to a new MutableIntSet.

public MutableIntStack
toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedIntIterable.toStack.

Converts the collection to a IntStack.

public String
toString()

Overrides org.eclipse.collections.impl.primitive.AbstractIntIterable.toString.

Implements java.lang.CharSequence.toString, org.eclipse.collections.api.PrimitiveIterable.toString.

Returns a string containing the characters in this sequence in the same order as this sequence.

public StringBuilder
public <T> ImmutableList<IntObjectPair<T>>
zip(Iterable<T> iterable)

Overrides default org.eclipse.collections.api.list.primitive.ImmutableIntList.zip.

Returns an ImmutableList formed from this ImmutableIntList and a ListIterable by combining corresponding elements in pairs.

public ImmutableList<IntIntPair>
zipInt(IntIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.ImmutableIntList.zipInt.

Returns an ImmutableList formed from this ImmutableIntList and another IntList by combining corresponding elements in pairs.

Inherited from org.eclipse.collections.impl.primitive.AbstractIntIterable:
asLazyaveragemaxIfEmptymedianminIfEmptytoSortedArraytoSortedList

Field Detail

adaptedback to summary
private final String adapted
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

CodePointAdapterback to summary
public CodePointAdapter(String value)

Method Detail

adaptback to summary
public static CodePointAdapter adapt(String value)
allSatisfyback to summary
public boolean allSatisfy(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.allSatisfy.

Doc from org.eclipse.collections.api.IntIterable.allSatisfy.

Returns true if all of the elements in the IntIterable return true for the specified predicate, otherwise returns false.

Annotations
@Override
anySatisfyback to summary
public boolean anySatisfy(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.anySatisfy.

Doc from org.eclipse.collections.api.IntIterable.anySatisfy.

Returns true if any of the elements in the IntIterable return true for the specified predicate, otherwise returns false.

Annotations
@Override
appendStringback to summary
public void appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.PrimitiveIterable.appendString.

Doc from org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable. Prints the string returned by makeString(String, String, String).

Annotations
@Override
asReversedback to summary
public LazyIntIterable asReversed()

Implements org.eclipse.collections.api.ordered.primitive.ReversibleIntIterable.asReversed.

Annotations
@Override
binarySearchback to summary
public int binarySearch(int value)

Implements org.eclipse.collections.api.list.primitive.IntList.binarySearch.

Annotations
@Override
charAtback to summary
public char charAt(int index)

Implements java.lang.CharSequence.charAt.

Doc from java.lang.CharSequence.charAt.

Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the char value specified by the index is a surrogate, the surrogate value is returned.

Annotations
@Override
chunkback to summary
public RichIterable<IntIterable> chunk(int size)

Overrides default org.eclipse.collections.api.IntIterable.chunk.

Doc from org.eclipse.collections.api.IntIterable.chunk.

Partitions elements in fixed size chunks.

Annotations
@Override
collectback to summary
public <V> ImmutableList<V> collect(IntToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.collect, org.eclipse.collections.api.IntIterable.collect.

Doc from org.eclipse.collections.api.IntIterable.collect.

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.

Annotations
@Override
collectIntback to summary
public CodePointAdapter collectInt(IntToIntFunction function)
containsback to summary
public boolean contains(int expected)

Implements org.eclipse.collections.api.IntIterable.contains.

Doc from org.eclipse.collections.api.IntIterable.contains.

Returns true if the value is contained in the IntIterable, and false if it is not.

Annotations
@Override
countback to summary
public int count(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.count.

Doc from org.eclipse.collections.api.IntIterable.count.

Returns a count of the number of elements in the IntIterable that return true for the specified predicate.

Annotations
@Override
detectIfNoneback to summary
public int detectIfNone(IntPredicate predicate, int ifNone)

Implements org.eclipse.collections.api.IntIterable.detectIfNone.

Annotations
@Override
distinctback to summary
public CodePointAdapter distinct()

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.distinct.

Annotations
@Override
dotProductback to summary
public long dotProduct(IntList list)

Implements org.eclipse.collections.api.list.primitive.IntList.dotProduct.

Annotations
@Override
eachback to summary
public void each(IntProcedure procedure)

Implements org.eclipse.collections.api.IntIterable.each.

Doc from org.eclipse.collections.api.IntIterable.each.

A synonym for forEach.

Annotations
@Override
equalsback to summary
public boolean equals(Object otherList)

Overrides java.lang.Object.equals.

Implements org.eclipse.collections.api.list.primitive.IntList.equals.

Doc from org.eclipse.collections.api.list.primitive.IntList.equals.

Follows the same general contract as java.util.List#equals(Object).

Annotations
@Override
equalsCodePointAdapterback to summary
private boolean equalsCodePointAdapter(CodePointAdapter adapter)
equalsIntListback to summary
public boolean equalsIntList(IntList list)
forEachWithIndexback to summary
public void forEachWithIndex(IntIntProcedure procedure)

Implements org.eclipse.collections.api.ordered.primitive.OrderedIntIterable.forEachWithIndex.

Annotations
@Override
fromback to summary
public static CodePointAdapter from(int... codePoints)
fromback to summary
public static CodePointAdapter from(IntIterable iterable)
getback to summary
public int get(int index)

Implements org.eclipse.collections.api.list.primitive.IntList.get.

Annotations
@Override
getFirstback to summary
public int getFirst()

Implements org.eclipse.collections.api.ordered.primitive.OrderedIntIterable.getFirst.

Annotations
@Override
getLastback to summary
public int getLast()

Implements org.eclipse.collections.api.ordered.primitive.ReversibleIntIterable.getLast.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements org.eclipse.collections.api.list.primitive.IntList.hashCode.

Doc from org.eclipse.collections.api.list.primitive.IntList.hashCode.

Follows the same general contract as java.util.List#hashCode().

Annotations
@Override
indexOfback to summary
public int indexOf(int value)

Implements org.eclipse.collections.api.ordered.primitive.OrderedIntIterable.indexOf.

Annotations
@Override
injectIntoback to summary
public <T> T injectInto(T injectedValue, ObjectIntToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.IntIterable.injectInto.

Annotations
@Override
injectIntoWithIndexback to summary
public <T> T injectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.ordered.primitive.ReversibleIntIterable.injectIntoWithIndex.

Annotations
@Override
intIteratorback to summary
public IntIterator intIterator()

Implements org.eclipse.collections.api.IntIterable.intIterator.

Doc from org.eclipse.collections.api.IntIterable.intIterator.

Returns a primitive iterator that can be used to iterate over the IntIterable in an imperative style.

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Overrides default java.lang.CharSequence.isEmpty, org.eclipse.collections.api.PrimitiveIterable.isEmpty.

Doc from java.lang.CharSequence.isEmpty.

Returns true if this character sequence is empty.

Annotations
@Override
lastIndexOfback to summary
public int lastIndexOf(int value)

Implements org.eclipse.collections.api.list.primitive.IntList.lastIndexOf.

Annotations
@Override
lengthback to summary
public int length()

Implements java.lang.CharSequence.length.

Doc from java.lang.CharSequence.length.

Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.

Annotations
@Override
maxback to summary
public int max()

Implements org.eclipse.collections.api.IntIterable.max.

Annotations
@Override
minback to summary
public int min()

Implements org.eclipse.collections.api.IntIterable.min.

Annotations
@Override
newWithback to summary
public CodePointAdapter newWith(int element)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.newWith.

Annotations
@Override
newWithAllback to summary
public CodePointAdapter newWithAll(IntIterable elements)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.newWithAll.

Annotations
@Override
newWithoutback to summary
public CodePointAdapter newWithout(int element)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.newWithout.

Annotations
@Override
newWithoutAllback to summary
public CodePointAdapter newWithoutAll(IntIterable elements)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.newWithoutAll.

Annotations
@Override
noneSatisfyback to summary
public boolean noneSatisfy(IntPredicate predicate)

Overrides default org.eclipse.collections.api.IntIterable.noneSatisfy.

Doc from org.eclipse.collections.api.IntIterable.noneSatisfy.

Returns true if none of the elements in the IntIterable return true for the specified predicate, otherwise returns false.

Annotations
@Override
rejectback to summary
public CodePointAdapter reject(IntPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.reject, org.eclipse.collections.api.IntIterable.reject.

Doc from org.eclipse.collections.api.IntIterable.reject.

Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.

Annotations
@Override
selectback to summary
public CodePointAdapter select(IntPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.select, org.eclipse.collections.api.IntIterable.select.

Doc from org.eclipse.collections.api.IntIterable.select.

Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.

Annotations
@Override
sizeback to summary
public int size()

Implements org.eclipse.collections.api.PrimitiveIterable.size.

Doc from org.eclipse.collections.api.PrimitiveIterable.size.

Returns the number of items in this iterable.

Annotations
@Override
spliteratorback to summary
public Spliterator.OfInt spliterator()

Implements org.eclipse.collections.api.list.primitive.IntList.spliterator.

Annotations
@Override
subListback to summary
public ImmutableIntList subList(int fromIndex, int toIndex)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.subList.

Annotations
@Override
subSequenceback to summary
public String subSequence(int start, int end)

Implements java.lang.CharSequence.subSequence.

Doc from java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.

Annotations
@Override
sumback to summary
public long sum()

Implements org.eclipse.collections.api.IntIterable.sum.

Annotations
@Override
toArrayback to summary
public int[] toArray()

Implements org.eclipse.collections.api.IntIterable.toArray.

Doc from org.eclipse.collections.api.IntIterable.toArray.

Converts the IntIterable to a primitive int array.

Annotations
@Override
toArrayback to summary
public int[] toArray(int[] target)

Overrides default org.eclipse.collections.api.IntIterable.toArray.

Doc from org.eclipse.collections.api.IntIterable.toArray.

Converts the IntIterable to a primitive int array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.

Annotations
@Override
toBagback to summary
public MutableIntBag toBag()

Overrides org.eclipse.collections.impl.primitive.AbstractIntIterable.toBag.

Implements org.eclipse.collections.api.IntIterable.toBag.

Doc from org.eclipse.collections.api.IntIterable.toBag.

Converts the IntIterable to a new MutableIntBag.

Annotations
@Override
toImmutableback to summary
public ImmutableIntList toImmutable()

Implements org.eclipse.collections.api.list.primitive.IntList.toImmutable.

Doc from org.eclipse.collections.api.list.primitive.IntList.toImmutable.

Returns an immutable copy of this list. If the list is immutable, it returns itself.

Annotations
@Override
toListback to summary
public MutableIntList toList()

Overrides org.eclipse.collections.impl.primitive.AbstractIntIterable.toList.

Implements org.eclipse.collections.api.IntIterable.toList.

Doc from org.eclipse.collections.api.IntIterable.toList.

Converts the IntIterable to a new MutableIntList.

Annotations
@Override
toReversedback to summary
public CodePointAdapter toReversed()

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.toReversed.

Annotations
@Override
toSetback to summary
public MutableIntSet toSet()

Overrides org.eclipse.collections.impl.primitive.AbstractIntIterable.toSet.

Implements org.eclipse.collections.api.IntIterable.toSet.

Doc from org.eclipse.collections.api.IntIterable.toSet.

Converts the IntIterable to a new MutableIntSet.

Annotations
@Override
toStackback to summary
public MutableIntStack toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedIntIterable.toStack.

Doc from org.eclipse.collections.api.ordered.primitive.OrderedIntIterable.toStack.

Converts the collection to a IntStack.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.eclipse.collections.impl.primitive.AbstractIntIterable.toString.

Implements java.lang.CharSequence.toString, org.eclipse.collections.api.PrimitiveIterable.toString.

Doc from java.lang.CharSequence.toString.

Returns a string containing the characters in this sequence in the same order as this sequence. The length of the string will be the length of this sequence.

Annotations
@Override
toStringBuilderback to summary
public StringBuilder toStringBuilder()
zipback to summary
public <T> ImmutableList<IntObjectPair<T>> zip(Iterable<T> iterable)

Overrides default org.eclipse.collections.api.list.primitive.ImmutableIntList.zip.

Doc from org.eclipse.collections.api.list.primitive.ImmutableIntList.zip.

Returns an 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.

Annotations
@Override
Since
9.1.
zipIntback to summary
public ImmutableList<IntIntPair> zipInt(IntIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.ImmutableIntList.zipInt.

Doc from org.eclipse.collections.api.list.primitive.ImmutableIntList.zipInt.

Returns an ImmutableList formed from this ImmutableIntList and another IntList by combining corresponding elements in pairs. If one of the two IntLists is longer than the other, its remaining elements are ignored.

Annotations
@Override
Since
9.1.
org.eclipse.collections.impl.string.immutable back to summary

private Class CodePointAdapter.InternalIntIterator

extends Object
implements IntIterator
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.string.immutable.CodePointAdapter.InternalIntIterator
All Implemented Interfaces
org.eclipse.collections.api.iterator.IntIterator

Field Summary

Modifier and TypeField and Description
private int
currentIndex

Index of element to be returned by subsequent call to next.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentIndexback to summary
private int currentIndex

Index of element to be returned by subsequent call to next.

Constructor Detail

InternalIntIteratorback to summary
private InternalIntIterator()

Method Detail

hasNextback to summary
public boolean hasNext()

Implements org.eclipse.collections.api.iterator.IntIterator.hasNext.

Annotations
@Override
nextback to summary
public int next()

Implements org.eclipse.collections.api.iterator.IntIterator.next.

Annotations
@Override