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() |
appendString, appendString, asLazy, average, containsAll, containsAll, isEmpty, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, notEmpty, toSortedArray, toSortedListchars, codePointsasLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toSortedArray, toSortedListappendString, appendString, isEmpty, makeString, makeString, makeString, notEmptypublic 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 CharSequencepublic int length()
length in interface CharSequencepublic String subSequence(int start, int end)
subSequence in interface CharSequencepublic StringBuilder toStringBuilder()
public String toString()
toString in interface CharSequencetoString in interface PrimitiveIterabletoString in class AbstractCharIterablepublic CharIterator charIterator()
charIterator in interface CharIterablepublic char[] toArray()
toArray in interface CharIterablepublic boolean contains(char expected)
contains in interface CharIterablepublic void forEach(CharProcedure procedure)
forEach in interface CharIterablepublic void each(CharProcedure procedure)
each in interface CharIterablepublic CharAdapter distinct()
distinct in interface CharListdistinct in interface ImmutableCharListdistinct in interface ReversibleCharIterablepublic CharAdapter newWith(char element)
newWith in interface ImmutableCharCollectionnewWith in interface ImmutableCharListpublic CharAdapter newWithout(char element)
newWithout in interface ImmutableCharCollectionnewWithout in interface ImmutableCharListpublic CharAdapter newWithAll(CharIterable elements)
newWithAll in interface ImmutableCharCollectionnewWithAll in interface ImmutableCharListpublic CharAdapter newWithoutAll(CharIterable elements)
newWithoutAll in interface ImmutableCharCollectionnewWithoutAll in interface ImmutableCharListpublic CharAdapter toReversed()
toReversed in interface CharListtoReversed in interface ImmutableCharListtoReversed in interface ReversibleCharIterablepublic ImmutableCharList subList(int fromIndex, int toIndex)
subList in interface CharListsubList in interface ImmutableCharListList#subList(int fromIndex, int toIndex)}public Character getCharacter(int index)
public long dotProduct(CharList list)
dotProduct in interface CharListpublic int binarySearch(char value)
binarySearch in interface CharListpublic int lastIndexOf(char value)
lastIndexOf in interface CharListpublic ImmutableCharList toImmutable()
CharListtoImmutable in interface CharListpublic char getLast()
getLast in interface ReversibleCharIterablepublic LazyCharIterable asReversed()
asReversed in interface ReversibleCharIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectCharIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedCharIterableinjectIntoWithIndex in interface ReversibleCharIterablepublic char getFirst()
getFirst in interface OrderedCharIterablepublic int indexOf(char value)
indexOf in interface OrderedCharIterablepublic void forEachWithIndex(CharIntProcedure procedure)
forEachWithIndex in interface OrderedCharIterablepublic CharAdapter select(CharPredicate predicate)
select in interface CharIterableselect in interface ImmutableCharCollectionselect in interface CharListselect in interface ImmutableCharListselect in interface OrderedCharIterableselect in interface ReversibleCharIterablepublic CharAdapter reject(CharPredicate predicate)
reject in interface CharIterablereject in interface ImmutableCharCollectionreject in interface CharListreject in interface ImmutableCharListreject in interface OrderedCharIterablereject in interface ReversibleCharIterablepublic <V> ImmutableList<V> collect(CharToObjectFunction<? extends V> function)
collect in interface CharIterablecollect in interface ImmutableCharCollectioncollect in interface CharListcollect in interface ImmutableCharListcollect in interface OrderedCharIterablecollect in interface ReversibleCharIterablepublic CharAdapter collectChar(CharToCharFunction function)
public char detectIfNone(CharPredicate predicate, char ifNone)
detectIfNone in interface CharIterablepublic int count(CharPredicate predicate)
count in interface CharIterablepublic boolean anySatisfy(CharPredicate predicate)
anySatisfy in interface CharIterablepublic boolean allSatisfy(CharPredicate predicate)
allSatisfy in interface CharIterablepublic boolean noneSatisfy(CharPredicate predicate)
noneSatisfy in interface CharIterablepublic MutableCharList toList()
toList in interface CharIterabletoList in class AbstractCharIterablepublic MutableCharSet toSet()
toSet in interface CharIterabletoSet in class AbstractCharIterablepublic MutableCharBag toBag()
toBag in interface CharIterabletoBag in class AbstractCharIterablepublic <T> T injectInto(T injectedValue,
ObjectCharToObjectFunction<? super T,? extends T> function)
injectInto in interface CharIterablepublic long sum()
sum in interface CharIterablepublic char max()
max in interface CharIterablepublic char min()
min in interface CharIterablepublic int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterablepublic boolean equals(Object otherList)
CharListList.equals(Object).Copyright © 2004–2016. All rights reserved.