public final class ByteCollections extends Object
The methods of this class all throw a NullPoByteerException if the provided collection is null.
Modifier and Type | Field and Description |
---|---|
static ByteIterator |
EMPTY_BYTE_ITERATOR
An unmodifiable, empty ByteIterator
|
static ByteList |
EMPTY_BYTE_LIST
An unmodifiable, empty ByteList
|
static ByteListIterator |
EMPTY_BYTE_LIST_ITERATOR
An unmodifiable, empty ByteListIterator
|
Constructor and Description |
---|
ByteCollections() |
Modifier and Type | Method and Description |
---|---|
static ByteIterator |
getEmptyByteIterator()
Returns an unmodifiable, empty ByteIterator
|
static ByteList |
getEmptyByteList()
Returns an unmodifiable, empty ByteList.
|
static ByteListIterator |
getEmptyByteListIterator()
Returns an unmodifiable, empty ByteListIterator
|
static ByteIterator |
singletonByteIterator(byte value)
Returns an unmodifiable ByteIterator containing only the specified element.
|
static ByteList |
singletonByteList(byte value)
Returns an unmodifiable ByteList containing only the specified element.
|
static ByteListIterator |
singletonByteListIterator(byte value)
Returns an unmodifiable ByteListIterator containing only the specified element.
|
static ByteIterator |
unmodifiableByteIterator(ByteIterator iter)
Returns an unmodifiable version of the given non-null ByteIterator.
|
static ByteList |
unmodifiableByteList(ByteList list)
Returns an unmodifiable version of the given non-null ByteList.
|
static ByteListIterator |
unmodifiableByteListIterator(ByteListIterator iter)
Returns an unmodifiable version of the given non-null ByteListIterator.
|
public static final ByteList EMPTY_BYTE_LIST
getEmptyByteList()
public static final ByteIterator EMPTY_BYTE_ITERATOR
getEmptyByteIterator()
public static final ByteListIterator EMPTY_BYTE_LIST_ITERATOR
getEmptyByteListIterator()
public ByteCollections()
public static ByteList singletonByteList(byte value)
value
- the single valuepublic static ByteIterator singletonByteIterator(byte value)
value
- the single valuepublic static ByteListIterator singletonByteListIterator(byte value)
value
- the single valuepublic static ByteList unmodifiableByteList(ByteList list) throws NullPointerException
list
- the non-null ByteList to wrap in an unmodifiable decoratorNullPointerException
- if the given ByteList is nullUnmodifiableByteList.wrap(org.apache.commons.collections.primitives.ByteList)
public static ByteIterator unmodifiableByteIterator(ByteIterator iter)
iter
- the non-null ByteIterator to wrap in an unmodifiable decoratorNullPointerException
- if the given ByteIterator is nullUnmodifiableByteIterator.wrap(org.apache.commons.collections.primitives.ByteIterator)
public static ByteListIterator unmodifiableByteListIterator(ByteListIterator iter)
iter
- the non-null ByteListIterator to wrap in an unmodifiable decoratorNullPointerException
- if the given ByteListIterator is nullUnmodifiableByteListIterator.wrap(org.apache.commons.collections.primitives.ByteListIterator)
public static ByteList getEmptyByteList()
EMPTY_BYTE_LIST
public static ByteIterator getEmptyByteIterator()
EMPTY_BYTE_ITERATOR
public static ByteListIterator getEmptyByteListIterator()
EMPTY_BYTE_LIST_ITERATOR
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.