org.apache.commons.collections.primitives
Class ShortCollections

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

public final class ShortCollections
extends java.lang.Object

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

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

Version:
$Revision: 1.1 $ $Date: 2003/10/29 18:57:15 $
Author:
Rodney Waldhoff

Field Summary
static ShortIterator EMPTY_SHORT_ITERATOR
          An unmodifiable, empty ShortIterator
static ShortList EMPTY_SHORT_LIST
          An unmodifiable, empty ShortList
static ShortListIterator EMPTY_SHORT_LIST_ITERATOR
          An unmodifiable, empty ShortListIterator
 
Constructor Summary
ShortCollections()
           
 
Method Summary
static ShortIterator getEmptyShortIterator()
          Returns an unmodifiable, empty ShortIterator
static ShortList getEmptyShortList()
          Returns an unmodifiable, empty ShortList.
static ShortListIterator getEmptyShortListIterator()
          Returns an unmodifiable, empty ShortListIterator
static ShortIterator singletonShortIterator(short value)
          Returns an unmodifiable ShortIterator containing only the specified element.
static ShortList singletonShortList(short value)
          Returns an unmodifiable ShortList containing only the specified element.
static ShortListIterator singletonShortListIterator(short value)
          Returns an unmodifiable ShortListIterator containing only the specified element.
static ShortIterator unmodifiableShortIterator(ShortIterator iter)
          Returns an unmodifiable version of the given non-null ShortIterator.
static ShortList unmodifiableShortList(ShortList list)
          Returns an unmodifiable version of the given non-null ShortList.
static ShortListIterator unmodifiableShortListIterator(ShortListIterator iter)
          Returns an unmodifiable version of the given non-null ShortListIterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_SHORT_LIST

public static final ShortList EMPTY_SHORT_LIST
An unmodifiable, empty ShortList

See Also:
getEmptyShortList()

EMPTY_SHORT_ITERATOR

public static final ShortIterator EMPTY_SHORT_ITERATOR
An unmodifiable, empty ShortIterator

See Also:
getEmptyShortIterator()

EMPTY_SHORT_LIST_ITERATOR

public static final ShortListIterator EMPTY_SHORT_LIST_ITERATOR
An unmodifiable, empty ShortListIterator

See Also:
getEmptyShortListIterator()
Constructor Detail

ShortCollections

public ShortCollections()
Method Detail

singletonShortList

public static ShortList singletonShortList(short value)
Returns an unmodifiable ShortList containing only the specified element.

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

singletonShortIterator

public static ShortIterator singletonShortIterator(short value)
Returns an unmodifiable ShortIterator containing only the specified element.

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

singletonShortListIterator

public static ShortListIterator singletonShortListIterator(short value)
Returns an unmodifiable ShortListIterator containing only the specified element.

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

unmodifiableShortList

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

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

unmodifiableShortIterator

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

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

unmodifiableShortListIterator

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

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

getEmptyShortList

public static ShortList getEmptyShortList()
Returns an unmodifiable, empty ShortList.

Returns:
an unmodifiable, empty ShortList.
See Also:
EMPTY_SHORT_LIST

getEmptyShortIterator

public static ShortIterator getEmptyShortIterator()
Returns an unmodifiable, empty ShortIterator

Returns:
an unmodifiable, empty ShortIterator.
See Also:
EMPTY_SHORT_ITERATOR

getEmptyShortListIterator

public static ShortListIterator getEmptyShortListIterator()
Returns an unmodifiable, empty ShortListIterator

Returns:
an unmodifiable, empty ShortListIterator.
See Also:
EMPTY_SHORT_LIST_ITERATOR


Copyright (c) 2002-2003 - Apache Software Foundation