public class CharAdapter extends AbstractCharIterable implements CharSequence, ImmutableCharList, Serializable
Constructor and Description |
---|
CharAdapter(String value) |
Modifier and Type | Method and Description |
---|---|
static CharAdapter |
adapt(String value) |
boolean |
allSatisfy(CharPredicate predicate) |
boolean |
anySatisfy(CharPredicate predicate) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable . |
LazyCharIterable |
asReversed() |
int |
binarySearch(char value) |
char |
charAt(int index) |
CharIterator |
charIterator() |
<V> ImmutableList<V> |
collect(CharToObjectFunction<? extends V> function) |
CharAdapter |
collectChar(CharToCharFunction function) |
boolean |
contains(char expected) |
int |
count(CharPredicate predicate) |
char |
detectIfNone(CharPredicate predicate,
char ifNone) |
CharAdapter |
distinct() |
long |
dotProduct(CharList list) |
void |
each(CharProcedure procedure) |
boolean |
equals(Object otherList)
Follows the same general contract as
List.equals(Object) . |
void |
forEach(CharProcedure procedure) |
void |
forEachWithIndex(CharIntProcedure procedure) |
static CharAdapter |
from(char... chars) |
static CharAdapter |
from(CharIterable iterable) |
char |
get(int index) |
Character |
getCharacter(int index) |
char |
getFirst() |
char |
getLast() |
int |
hashCode()
Follows the same general contract as
List.hashCode() . |
int |
indexOf(char value) |
<T> T |
injectInto(T injectedValue,
ObjectCharToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectCharIntToObjectFunction<? super T,? extends T> function) |
int |
lastIndexOf(char value) |
int |
length() |
char |
max() |
char |
min() |
CharAdapter |
newWith(char element) |
CharAdapter |
newWithAll(CharIterable elements) |
CharAdapter |
newWithout(char element) |
CharAdapter |
newWithoutAll(CharIterable elements) |
boolean |
noneSatisfy(CharPredicate predicate) |
CharAdapter |
reject(CharPredicate predicate) |
CharAdapter |
select(CharPredicate predicate) |
int |
size()
Returns the number of items in this iterable.
|
ImmutableCharList |
subList(int fromIndex,
int toIndex) |
String |
subSequence(int start,
int end) |
long |
sum() |
char[] |
toArray() |
MutableCharBag |
toBag() |
ImmutableCharList |
toImmutable()
Returns an immutable copy of this list.
|
MutableCharList |
toList() |
CharAdapter |
toReversed() |
MutableCharSet |
toSet() |
String |
toString()
The value of toString must be strictly implemented as defined in CharSequence.
|
StringBuilder |
toStringBuilder() |
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toSortedArray, toSortedList
chars, codePoints
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, summaryStatistics, toSortedArray, toSortedList
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty
public CharAdapter(String value)
public static CharAdapter adapt(String value)
public static CharAdapter from(char... chars)
public static CharAdapter from(CharIterable iterable)
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 StringBuilder toStringBuilder()
public String toString()
toString
in interface CharSequence
toString
in interface PrimitiveIterable
toString
in class AbstractCharIterable
public CharIterator charIterator()
charIterator
in interface CharIterable
public char[] toArray()
toArray
in interface CharIterable
public boolean contains(char expected)
contains
in interface CharIterable
public void forEach(CharProcedure procedure)
forEach
in interface CharIterable
public void each(CharProcedure procedure)
each
in interface CharIterable
public CharAdapter distinct()
distinct
in interface CharList
distinct
in interface ImmutableCharList
distinct
in interface ReversibleCharIterable
public CharAdapter newWith(char element)
newWith
in interface ImmutableCharCollection
newWith
in interface ImmutableCharList
public CharAdapter newWithout(char element)
newWithout
in interface ImmutableCharCollection
newWithout
in interface ImmutableCharList
public CharAdapter newWithAll(CharIterable elements)
newWithAll
in interface ImmutableCharCollection
newWithAll
in interface ImmutableCharList
public CharAdapter newWithoutAll(CharIterable elements)
newWithoutAll
in interface ImmutableCharCollection
newWithoutAll
in interface ImmutableCharList
public CharAdapter toReversed()
toReversed
in interface CharList
toReversed
in interface ImmutableCharList
toReversed
in interface ReversibleCharIterable
public ImmutableCharList subList(int fromIndex, int toIndex)
subList
in interface CharList
subList
in interface ImmutableCharList
List#subList(int fromIndex, int toIndex)}
public Character getCharacter(int index)
public long dotProduct(CharList list)
dotProduct
in interface CharList
public int binarySearch(char value)
binarySearch
in interface CharList
public int lastIndexOf(char value)
lastIndexOf
in interface CharList
public ImmutableCharList toImmutable()
CharList
toImmutable
in interface CharList
public char getLast()
getLast
in interface ReversibleCharIterable
public LazyCharIterable asReversed()
asReversed
in interface ReversibleCharIterable
public <T> T injectIntoWithIndex(T injectedValue, ObjectCharIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex
in interface OrderedCharIterable
injectIntoWithIndex
in interface ReversibleCharIterable
public char getFirst()
getFirst
in interface OrderedCharIterable
public int indexOf(char value)
indexOf
in interface OrderedCharIterable
public void forEachWithIndex(CharIntProcedure procedure)
forEachWithIndex
in interface OrderedCharIterable
public CharAdapter select(CharPredicate predicate)
select
in interface CharIterable
select
in interface ImmutableCharCollection
select
in interface CharList
select
in interface ImmutableCharList
select
in interface OrderedCharIterable
select
in interface ReversibleCharIterable
public CharAdapter reject(CharPredicate predicate)
reject
in interface CharIterable
reject
in interface ImmutableCharCollection
reject
in interface CharList
reject
in interface ImmutableCharList
reject
in interface OrderedCharIterable
reject
in interface ReversibleCharIterable
public <V> ImmutableList<V> collect(CharToObjectFunction<? extends V> function)
collect
in interface CharIterable
collect
in interface ImmutableCharCollection
collect
in interface CharList
collect
in interface ImmutableCharList
collect
in interface OrderedCharIterable
collect
in interface ReversibleCharIterable
public CharAdapter collectChar(CharToCharFunction function)
public char detectIfNone(CharPredicate predicate, char ifNone)
detectIfNone
in interface CharIterable
public int count(CharPredicate predicate)
count
in interface CharIterable
public boolean anySatisfy(CharPredicate predicate)
anySatisfy
in interface CharIterable
public boolean allSatisfy(CharPredicate predicate)
allSatisfy
in interface CharIterable
public boolean noneSatisfy(CharPredicate predicate)
noneSatisfy
in interface CharIterable
public MutableCharList toList()
toList
in interface CharIterable
toList
in class AbstractCharIterable
public MutableCharSet toSet()
toSet
in interface CharIterable
toSet
in class AbstractCharIterable
public MutableCharBag toBag()
toBag
in interface CharIterable
toBag
in class AbstractCharIterable
public <T> T injectInto(T injectedValue, ObjectCharToObjectFunction<? super T,? extends T> function)
injectInto
in interface CharIterable
public long sum()
sum
in interface CharIterable
public char max()
max
in interface CharIterable
public char min()
min
in interface CharIterable
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)
CharList
List.equals(Object)
.Copyright © 2004–2016. All rights reserved.