public final class CharCollections extends Object
The methods of this class all throw a NullPoCharerException if the provided collection is null.
Modifier and Type | Field and Description |
---|---|
static CharIterator |
EMPTY_CHAR_ITERATOR
An unmodifiable, empty CharIterator
|
static CharList |
EMPTY_CHAR_LIST
An unmodifiable, empty CharList
|
static CharListIterator |
EMPTY_CHAR_LIST_ITERATOR
An unmodifiable, empty CharListIterator
|
Constructor and Description |
---|
CharCollections() |
Modifier and Type | Method and Description |
---|---|
static CharIterator |
getEmptyCharIterator()
Returns an unmodifiable, empty CharIterator
|
static CharList |
getEmptyCharList()
Returns an unmodifiable, empty CharList.
|
static CharListIterator |
getEmptyCharListIterator()
Returns an unmodifiable, empty CharListIterator
|
static CharIterator |
singletonCharIterator(char value)
Returns an unmodifiable CharIterator containing only the specified element.
|
static CharList |
singletonCharList(char value)
Returns an unmodifiable CharList containing only the specified element.
|
static CharListIterator |
singletonCharListIterator(char value)
Returns an unmodifiable CharListIterator containing only the specified element.
|
static CharIterator |
unmodifiableCharIterator(CharIterator iter)
Returns an unmodifiable version of the given non-null CharIterator.
|
static CharList |
unmodifiableCharList(CharList list)
Returns an unmodifiable version of the given non-null CharList.
|
static CharListIterator |
unmodifiableCharListIterator(CharListIterator iter)
Returns an unmodifiable version of the given non-null CharListIterator.
|
public static final CharList EMPTY_CHAR_LIST
getEmptyCharList()
public static final CharIterator EMPTY_CHAR_ITERATOR
getEmptyCharIterator()
public static final CharListIterator EMPTY_CHAR_LIST_ITERATOR
getEmptyCharListIterator()
public CharCollections()
public static CharList singletonCharList(char value)
value
- the single valuepublic static CharIterator singletonCharIterator(char value)
value
- the single valuepublic static CharListIterator singletonCharListIterator(char value)
value
- the single valuepublic static CharList unmodifiableCharList(CharList list) throws NullPointerException
list
- the non-null CharList to wrap in an unmodifiable decoratorNullPointerException
- if the given CharList is nullUnmodifiableCharList.wrap(org.apache.commons.collections.primitives.CharList)
public static CharIterator unmodifiableCharIterator(CharIterator iter)
iter
- the non-null CharIterator to wrap in an unmodifiable decoratorNullPointerException
- if the given CharIterator is nullUnmodifiableCharIterator.wrap(org.apache.commons.collections.primitives.CharIterator)
public static CharListIterator unmodifiableCharListIterator(CharListIterator iter)
iter
- the non-null CharListIterator to wrap in an unmodifiable decoratorNullPointerException
- if the given CharListIterator is nullUnmodifiableCharListIterator.wrap(org.apache.commons.collections.primitives.CharListIterator)
public static CharList getEmptyCharList()
EMPTY_CHAR_LIST
public static CharIterator getEmptyCharIterator()
EMPTY_CHAR_ITERATOR
public static CharListIterator getEmptyCharListIterator()
EMPTY_CHAR_LIST_ITERATOR
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.