⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.buffer

Class UnmodifiableBuffer

java.lang.Object
|
+--org.apache.commons.collections.collection.AbstractCollectionDecorator
   |
   +--org.apache.commons.collections.buffer.AbstractBufferDecorator
      |
      +--org.apache.commons.collections.buffer.UnmodifiableBuffer

All Implemented Interfaces:
Collection, Buffer, Unmodifiable


public final class UnmodifiableBuffer
extends AbstractBufferDecorator
implements Unmodifiable

Decorates another Buffer to ensure it can't be altered.
Since:
Commons Collections 3.0
Author:
Stephen Colebourne

Method Summary

boolean

add(Object object)

boolean

addAll(Collection coll)

void

clear()

static Buffer

decorate(Buffer buffer)

Factory method to create an unmodifiable buffer.

Iterator

iterator()

boolean

remove(Object object)

Object

remove()

boolean

removeAll(Collection coll)

boolean

retainAll(Collection coll)

Method Details

add

public boolean add(Object object)

Parameters:
object

addAll

public boolean addAll(Collection coll)

Parameters:
coll

clear

public void clear()


decorate

public static Buffer decorate(Buffer buffer)

Factory method to create an unmodifiable buffer.

Parameters:
buffer - the buffer to decorate, must not be null
Throws:
- if buffer is null

iterator

public Iterator iterator()


remove

public Object remove()


remove

public boolean remove(Object object)

Parameters:
object

removeAll

public boolean removeAll(Collection coll)

Parameters:
coll

retainAll

public boolean retainAll(Collection coll)

Parameters:
coll