public final class

UnmodifiableBuffer

extends AbstractBufferDecorator
implements Serializable Unmodifiable
java.lang.Object
   ↳ org.apache.commons.collections.collection.AbstractCollectionDecorator
     ↳ org.apache.commons.collections.buffer.AbstractBufferDecorator
       ↳ org.apache.commons.collections.buffer.UnmodifiableBuffer

Class Overview

Decorates another Buffer to ensure it can't be altered.

This class is Serializable from Commons Collections 3.1.

Summary

[Expand]
Inherited Fields
From class org.apache.commons.collections.collection.AbstractCollectionDecorator
Public Methods
boolean add(Object object)
boolean addAll(Collection coll)
void clear()
static Buffer decorate(Buffer buffer)
Factory method to create an unmodifiable buffer.
Iterator iterator()
Object remove()
Gets and removes the next object from the buffer.
boolean remove(Object object)
boolean removeAll(Collection coll)
boolean retainAll(Collection coll)
[Expand]
Inherited Methods
From class org.apache.commons.collections.buffer.AbstractBufferDecorator
From class org.apache.commons.collections.collection.AbstractCollectionDecorator
From class java.lang.Object
From interface java.lang.Iterable
From interface java.util.Collection
From interface org.apache.commons.collections.Buffer

Public Methods

public boolean add (Object object)

public boolean addAll (Collection coll)

public void clear ()

public static Buffer decorate (Buffer buffer)

Factory method to create an unmodifiable buffer.

If the buffer passed in is already unmodifiable, it is returned.

Parameters
buffer the buffer to decorate, must not be null
Returns
  • an unmodifiable Buffer
Throws
IllegalArgumentException if buffer is null

public Iterator iterator ()

public Object remove ()

Gets and removes the next object from the buffer.

Returns
  • the next object in the buffer, which is also removed

public boolean remove (Object object)

public boolean removeAll (Collection coll)

public boolean retainAll (Collection coll)