public final class UnmodifiableBuffer extends AbstractBufferDecorator implements Unmodifiable, java.io.Serializable
Buffer to ensure it can't be altered.
This class is Serializable from Commons Collections 3.1.
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID
Serialization version
|
collection| Modifier | Constructor and Description |
|---|---|
private |
UnmodifiableBuffer(Buffer buffer)
Constructor that wraps (not copies).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.Object object) |
boolean |
addAll(java.util.Collection coll) |
void |
clear() |
static Buffer |
decorate(Buffer buffer)
Factory method to create an unmodifiable buffer.
|
java.util.Iterator |
iterator() |
private void |
readObject(java.io.ObjectInputStream in)
Read the collection in using a custom routine.
|
java.lang.Object |
remove()
Gets and removes the next object from the buffer.
|
boolean |
remove(java.lang.Object object) |
boolean |
removeAll(java.util.Collection coll) |
boolean |
retainAll(java.util.Collection coll) |
private void |
writeObject(java.io.ObjectOutputStream out)
Write the collection out using a custom routine.
|
get, getBuffercontains, containsAll, equals, getCollection, hashCode, isEmpty, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitprivate static final long serialVersionUID
private UnmodifiableBuffer(Buffer buffer)
buffer - the buffer to decorate, must not be nulljava.lang.IllegalArgumentException - if buffer is nullpublic static Buffer decorate(Buffer buffer)
If the buffer passed in is already unmodifiable, it is returned.
buffer - the buffer to decorate, must not be nulljava.lang.IllegalArgumentException - if buffer is nullprivate void writeObject(java.io.ObjectOutputStream out)
throws java.io.IOException
out - the output streamjava.io.IOExceptionprivate void readObject(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
in - the input streamjava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in class AbstractCollectionDecoratorpublic boolean add(java.lang.Object object)
add in interface java.util.Collectionadd in class AbstractCollectionDecoratorpublic boolean addAll(java.util.Collection coll)
addAll in interface java.util.CollectionaddAll in class AbstractCollectionDecoratorpublic void clear()
clear in interface java.util.Collectionclear in class AbstractCollectionDecoratorpublic boolean remove(java.lang.Object object)
remove in interface java.util.Collectionremove in class AbstractCollectionDecoratorpublic boolean removeAll(java.util.Collection coll)
removeAll in interface java.util.CollectionremoveAll in class AbstractCollectionDecoratorpublic boolean retainAll(java.util.Collection coll)
retainAll in interface java.util.CollectionretainAll in class AbstractCollectionDecoratorpublic java.lang.Object remove()
Bufferremove in interface Bufferremove in class AbstractBufferDecorator