org.apache.commons.collections.buffer

Class UnmodifiableBuffer

public final class UnmodifiableBuffer extends AbstractBufferDecorator implements Unmodifiable, Serializable

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

This class is Serializable from Commons Collections 3.1.

Since: Commons Collections 3.0

Version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $

Author: Stephen Colebourne

Method Summary
booleanadd(Object object)
booleanaddAll(Collection coll)
voidclear()
static Bufferdecorate(Buffer buffer)
Factory method to create an unmodifiable buffer.
Iteratoriterator()
booleanremove(Object object)
Objectremove()
booleanremoveAll(Collection coll)
booleanretainAll(Collection coll)

Method Detail

add

public boolean add(Object object)

addAll

public boolean addAll(Collection coll)

clear

public void clear()

decorate

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

iterator

public Iterator iterator()

remove

public boolean remove(Object object)

remove

public Object remove()

removeAll

public boolean removeAll(Collection coll)

retainAll

public boolean retainAll(Collection coll)
Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.