@FunctionalInterface
public interface CharIterable
extends java.lang.Iterable<java.lang.Character>
| Modifier and Type | Method and Description |
|---|---|
default java.io.Reader |
asReader() |
default void |
clear() |
default boolean |
containsAllChars(char... xs) |
default boolean |
containsAllChars(CharIterable c) |
default boolean |
containsAnyChars(char... xs) |
default boolean |
containsAnyChars(CharIterable xs) |
default boolean |
containsChar(char x) |
default void |
forEach(java.util.function.Consumer<? super java.lang.Character> consumer)
Perform the given action for each
char in this iterable. |
default void |
forEachChar(CharConsumer consumer)
Perform the given action for each
char in this iterable. |
static CharIterable |
from(java.lang.Character... characters) |
static CharIterable |
from(java.lang.Iterable<java.lang.Character> iterable) |
default IntIterator |
intIterator() |
default java.util.Spliterator.OfInt |
intSpliterator() |
default java.util.stream.IntStream |
intStream() |
default boolean |
isEmpty() |
CharIterator |
iterator() |
static CharIterable |
of(char... characters) |
static CharIterable |
once(CharIterator iterator) |
default java.util.stream.IntStream |
parallelIntStream() |
static CharIterable |
read(java.io.Reader reader)
Create a
CharIterable from a Reader which iterates over the characters provided in the reader. |
default boolean |
removeAllChars(char... xs) |
default boolean |
removeAllChars(CharIterable xs) |
default boolean |
removeChar(char x) |
default boolean |
removeCharsIf(CharPredicate filter) |
default boolean |
retainAllChars(char... xs) |
default boolean |
retainAllChars(CharIterable xs) |
default CharSeq |
sequence() |
static CharIterable read(java.io.Reader reader)
CharIterable from a Reader which iterates over the characters provided in the reader.
The Reader must support Reader.reset() or the CharIterable will only be available to
iterate over once. The Reader will be reset in between iterations, if possible. If an
IOException occurs during iteration, an IterationException will be thrown. The Reader
will not be closed by the CharIterable when iteration finishes, it must be closed externally when
iteration is finished.static CharIterable of(char... characters)
static CharIterable from(java.lang.Character... characters)
static CharIterable from(java.lang.Iterable<java.lang.Character> iterable)
static CharIterable once(CharIterator iterator)
CharIterator iterator()
iterator in interface java.lang.Iterable<java.lang.Character>default IntIterator intIterator()
IntIterator over the characters in this CharIterable as int values.default java.io.Reader asReader()
CharIterable as a Reader. Mark and reset is supported, by re-traversing
the iterator to the mark position.default void forEachChar(CharConsumer consumer)
char in this iterable.default void forEach(java.util.function.Consumer<? super java.lang.Character> consumer)
char in this iterable.forEach in interface java.lang.Iterable<java.lang.Character>default java.util.stream.IntStream intStream()
default java.util.stream.IntStream parallelIntStream()
default java.util.Spliterator.OfInt intSpliterator()
default boolean isEmpty()
default void clear()
default boolean containsChar(char x)
default boolean removeChar(char x)
default boolean containsAllChars(char... xs)
default boolean containsAllChars(CharIterable c)
default boolean containsAnyChars(char... xs)
CharIterable contains any of the given chars, false otherwise.default boolean containsAnyChars(CharIterable xs)
CharIterable contains any of the chars in the given CharIterable,
false otherwise.default boolean removeAllChars(char... xs)
default boolean removeAllChars(CharIterable xs)
default boolean retainAllChars(char... xs)
default boolean retainAllChars(CharIterable xs)
default boolean removeCharsIf(CharPredicate filter)