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

Class UnmodifiableSortedBag

java.lang.Object
|
+--org.apache.commons.collections.collection.AbstractCollectionDecorator
   |
   +--org.apache.commons.collections.bag.AbstractBagDecorator
      |
      +--org.apache.commons.collections.bag.AbstractSortedBagDecorator
         |
         +--org.apache.commons.collections.bag.UnmodifiableSortedBag

All Implemented Interfaces:
Collection, Bag, SortedBag, Unmodifiable


public final class UnmodifiableSortedBag
extends AbstractSortedBagDecorator
implements Unmodifiable

Decorates another SortedBag 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 SortedBag

decorate(SortedBag bag)

Factory method to create an unmodifiable bag.

Iterator

iterator()

boolean

remove(Object object)

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 SortedBag decorate(SortedBag bag)

Factory method to create an unmodifiable bag.

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

iterator

public Iterator iterator()


remove

public boolean remove(Object object)

Parameters:
object

removeAll

public boolean removeAll(Collection coll)

Parameters:
coll

retainAll

public boolean retainAll(Collection coll)

Parameters:
coll