org.apache.commons.collections.primitives
Class LongCollections

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

public final class LongCollections
extends java.lang.Object

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

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

Version:
$Revision: 1.1 $ $Date: 2003/10/27 23:46:10 $
Author:
Rodney Waldhoff

Field Summary
static LongIterator EMPTY_LONG_ITERATOR
          An unmodifiable, empty LongIterator
static LongList EMPTY_LONG_LIST
          An unmodifiable, empty LongList
static LongListIterator EMPTY_LONG_LIST_ITERATOR
          An unmodifiable, empty LongListIterator
 
Constructor Summary
LongCollections()
           
 
Method Summary
static LongIterator getEmptyLongIterator()
          Returns an unmodifiable, empty LongIterator
static LongList getEmptyLongList()
          Returns an unmodifiable, empty LongList.
static LongListIterator getEmptyLongListIterator()
          Returns an unmodifiable, empty LongListIterator
static LongIterator singletonLongIterator(long value)
          Returns an unmodifiable LongIterator containing only the specified element.
static LongList singletonLongList(long value)
          Returns an unmodifiable LongList containing only the specified element.
static LongListIterator singletonLongListIterator(long value)
          Returns an unmodifiable LongListIterator containing only the specified element.
static LongIterator unmodifiableLongIterator(LongIterator iter)
          Returns an unmodifiable version of the given non-null LongIterator.
static LongList unmodifiableLongList(LongList list)
          Returns an unmodifiable version of the given non-null LongList.
static LongListIterator unmodifiableLongListIterator(LongListIterator iter)
          Returns an unmodifiable version of the given non-null LongListIterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_LONG_LIST

public static final LongList EMPTY_LONG_LIST
An unmodifiable, empty LongList

See Also:
getEmptyLongList()

EMPTY_LONG_ITERATOR

public static final LongIterator EMPTY_LONG_ITERATOR
An unmodifiable, empty LongIterator

See Also:
getEmptyLongIterator()

EMPTY_LONG_LIST_ITERATOR

public static final LongListIterator EMPTY_LONG_LIST_ITERATOR
An unmodifiable, empty LongListIterator

See Also:
getEmptyLongListIterator()
Constructor Detail

LongCollections

public LongCollections()
Method Detail

singletonLongList

public static LongList singletonLongList(long value)
Returns an unmodifiable LongList containing only the specified element.

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

singletonLongIterator

public static LongIterator singletonLongIterator(long value)
Returns an unmodifiable LongIterator containing only the specified element.

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

singletonLongListIterator

public static LongListIterator singletonLongListIterator(long value)
Returns an unmodifiable LongListIterator containing only the specified element.

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

unmodifiableLongList

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

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

unmodifiableLongIterator

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

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

unmodifiableLongListIterator

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

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

getEmptyLongList

public static LongList getEmptyLongList()
Returns an unmodifiable, empty LongList.

Returns:
an unmodifiable, empty LongList.
See Also:
EMPTY_LONG_LIST

getEmptyLongIterator

public static LongIterator getEmptyLongIterator()
Returns an unmodifiable, empty LongIterator

Returns:
an unmodifiable, empty LongIterator.
See Also:
EMPTY_LONG_ITERATOR

getEmptyLongListIterator

public static LongListIterator getEmptyLongListIterator()
Returns an unmodifiable, empty LongListIterator

Returns:
an unmodifiable, empty LongListIterator.
See Also:
EMPTY_LONG_LIST_ITERATOR


Copyright (c) 2002-2003 - Apache Software Foundation