org.apache.commons.collections.primitives
Class CharCollections

java.lang.Object
  extended by org.apache.commons.collections.primitives.CharCollections

public final class CharCollections
extends java.lang.Object

This class consists exclusively of static methods that operate on or return CharCollections.

The methods of this class all throw a NullPoCharerException if the provided collection is null.

Version:
$Revision: 1.1 $ $Date: 2003/10/29 19:20:08 $
Author:
Rodney Waldhoff

Field Summary
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 Summary
CharCollections()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_CHAR_LIST

public static final CharList EMPTY_CHAR_LIST
An unmodifiable, empty CharList

See Also:
getEmptyCharList()

EMPTY_CHAR_ITERATOR

public static final CharIterator EMPTY_CHAR_ITERATOR
An unmodifiable, empty CharIterator

See Also:
getEmptyCharIterator()

EMPTY_CHAR_LIST_ITERATOR

public static final CharListIterator EMPTY_CHAR_LIST_ITERATOR
An unmodifiable, empty CharListIterator

See Also:
getEmptyCharListIterator()
Constructor Detail

CharCollections

public CharCollections()
Method Detail

singletonCharList

public static CharList singletonCharList(char value)
Returns an unmodifiable CharList containing only the specified element.

Parameters:
value - the single value
Returns:
an unmodifiable CharList containing only the specified element.

singletonCharIterator

public static CharIterator singletonCharIterator(char value)
Returns an unmodifiable CharIterator containing only the specified element.

Parameters:
value - the single value
Returns:
an unmodifiable CharIterator containing only the specified element.

singletonCharListIterator

public static CharListIterator singletonCharListIterator(char value)
Returns an unmodifiable CharListIterator containing only the specified element.

Parameters:
value - the single value
Returns:
an unmodifiable CharListIterator containing only the specified element.

unmodifiableCharList

public static CharList unmodifiableCharList(CharList list)
                                     throws java.lang.NullPointerException
Returns an unmodifiable version of the given non-null CharList.

Parameters:
list - the non-null CharList to wrap in an unmodifiable decorator
Returns:
an unmodifiable version of the given non-null CharList
Throws:
NullPoCharerException - if the given CharList is null
java.lang.NullPointerException
See Also:
UnmodifiableCharList.wrap(org.apache.commons.collections.primitives.CharList)

unmodifiableCharIterator

public static CharIterator unmodifiableCharIterator(CharIterator iter)
Returns an unmodifiable version of the given non-null CharIterator.

Parameters:
iter - the non-null CharIterator to wrap in an unmodifiable decorator
Returns:
an unmodifiable version of the given non-null CharIterator
Throws:
NullPoCharerException - if the given CharIterator is null
See Also:
UnmodifiableCharIterator.wrap(org.apache.commons.collections.primitives.CharIterator)

unmodifiableCharListIterator

public static CharListIterator unmodifiableCharListIterator(CharListIterator iter)
Returns an unmodifiable version of the given non-null CharListIterator.

Parameters:
iter - the non-null CharListIterator to wrap in an unmodifiable decorator
Returns:
an unmodifiable version of the given non-null CharListIterator
Throws:
NullPoCharerException - if the given CharListIterator is null
See Also:
UnmodifiableCharListIterator.wrap(org.apache.commons.collections.primitives.CharListIterator)

getEmptyCharList

public static CharList getEmptyCharList()
Returns an unmodifiable, empty CharList.

Returns:
an unmodifiable, empty CharList.
See Also:
EMPTY_CHAR_LIST

getEmptyCharIterator

public static CharIterator getEmptyCharIterator()
Returns an unmodifiable, empty CharIterator

Returns:
an unmodifiable, empty CharIterator.
See Also:
EMPTY_CHAR_ITERATOR

getEmptyCharListIterator

public static CharListIterator getEmptyCharListIterator()
Returns an unmodifiable, empty CharListIterator

Returns:
an unmodifiable, empty CharListIterator.
See Also:
EMPTY_CHAR_LIST_ITERATOR


Copyright (c) 2002-2003 - Apache Software Foundation