|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bak.pcj.UnmodifiableByteCollection
This class represents unmodifiable collections of byte values.
Collections.unmodifiableCollection(java.util.Collection)
Field Summary | |
protected ByteCollection |
collection
The collection underlying this unmodifiable collection. |
Constructor Summary | |
UnmodifiableByteCollection(ByteCollection c)
Creates a new unmodifiable collection on an existing collection. |
Method Summary | |
boolean |
add(byte v)
Throws UnsupportedOperationException. |
boolean |
addAll(ByteCollection c)
Throws UnsupportedOperationException. |
void |
clear()
Throws UnsupportedOperationException. |
boolean |
contains(byte v)
Indicates whether this collection contains a specified element. |
boolean |
containsAll(ByteCollection c)
Indicates whether all elements of a specified collection is contained in this collection. |
boolean |
equals(Object obj)
Indicates whether this collection is equal to some object. |
int |
hashCode()
Returns a hash code value for this collection. |
boolean |
isEmpty()
Indicates whether this collection is empty. |
ByteIterator |
iterator()
Returns an iterator over this collection. |
boolean |
remove(byte v)
Throws UnsupportedOperationException. |
boolean |
removeAll(ByteCollection c)
Throws UnsupportedOperationException. |
boolean |
retainAll(ByteCollection c)
Throws UnsupportedOperationException. |
int |
size()
Returns the number of elements in this collection. |
byte[] |
toArray()
Returns the elements of this collection as an array. |
byte[] |
toArray(byte[] a)
Returns the elements of this collection as an array. |
void |
trimToSize()
Minimizes the memory used by this collection. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ByteCollection collection
Constructor Detail |
public UnmodifiableByteCollection(ByteCollection c)
c
- the existing collection to make unmodifiable.
NullPointerException
- if c is null.Method Detail |
public boolean add(byte v)
add
in interface ByteCollection
v
- the element to add to this collection.
UnsupportedOperationException
- unconditionally.ByteCollection.addAll(ByteCollection)
public boolean addAll(ByteCollection c)
addAll
in interface ByteCollection
c
- the collection whose elements to add to this
collection.
UnsupportedOperationException
- unconditionally.ByteCollection.add(byte)
public void clear()
clear
in interface ByteCollection
UnsupportedOperationException
- unconditionally.public boolean contains(byte v)
ByteCollection
contains
in interface ByteCollection
v
- the element to test for containment.
ByteCollection.containsAll(ByteCollection)
public boolean containsAll(ByteCollection c)
ByteCollection
containsAll
in interface ByteCollection
c
- the collection whose elements to test for
containment.
ByteCollection.contains(byte)
public boolean equals(Object obj)
ByteCollection
equals
in interface ByteCollection
public int hashCode()
ByteCollection
hashCode
in interface ByteCollection
public boolean isEmpty()
ByteCollection
isEmpty
in interface ByteCollection
public ByteIterator iterator()
ByteCollection
iterator
in interface ByteCollection
public boolean remove(byte v)
remove
in interface ByteCollection
v
- the byte value to remove from this collection.
UnsupportedOperationException
- unconditionally.public boolean removeAll(ByteCollection c)
removeAll
in interface ByteCollection
c
- the collection whose elements to remove from this
collection.
UnsupportedOperationException
- unconditionally.public boolean retainAll(ByteCollection c)
retainAll
in interface ByteCollection
c
- the collection whose elements to retain in this
collection.
UnsupportedOperationException
- unconditionally.public int size()
ByteCollection
size
in interface ByteCollection
public byte[] toArray()
ByteCollection
toArray
in interface ByteCollection
public byte[] toArray(byte[] a)
ByteCollection
toArray
in interface ByteCollection
a
- an array to fill with the elements of this
collection; if a is null or not
big enough to contain all the elements of this
collection, an new array is allocated,
and a is not changed.
public void trimToSize()
ByteCollection
trimToSize
in interface ByteCollection
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |