/** * Returns an unmodifiable collection backed by the given collection. * <p> * This method uses the implementation in the decorators subpackage. * * @param collection the collection to make unmodifiable, must not be null * @return an unmodifiable collection backed by the given collection * @throws IllegalArgumentException if the collection is null */ public static Collection unmodifiableCollection(Collection collection) { return UnmodifiableCollection.decorate(collection); }
/** * Factory method to create an unmodifiable collection. * <p> * If the collection passed in is already unmodifiable, it is returned. * * @param coll the collection to decorate, must not be null * @return an unmodifiable collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { if (coll instanceof Unmodifiable) { return coll; } return new UnmodifiableCollection(coll); }
public Iterator iterator() { return UnmodifiableIterator.decorate(getCollection().iterator()); }
/** * Returns an unmodifiable collection backed by the given collection. * <p> * This method uses the implementation in the decorators subpackage. * * @param collection the collection to make unmodifiable, must not be null * @return an unmodifiable collection backed by the given collection * @throws IllegalArgumentException if the collection is null */ public static Collection unmodifiableCollection(Collection collection) { return UnmodifiableCollection.decorate(collection); }
/** * Factory method to create an unmodifiable collection. * <p> * If the collection passed in is already unmodifiable, it is returned. * * @param coll the collection to decorate, must not be null * @return an unmodifiable collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { if (coll instanceof Unmodifiable) { return coll; } return new UnmodifiableCollection(coll); }
public Iterator iterator() { return UnmodifiableIterator.decorate(getCollection().iterator()); }
public Collection values() { Collection coll = map.values(); return UnmodifiableCollection.decorate(coll); }
/** * Factory method to create an unmodifiable collection. * <p> * If the collection passed in is already unmodifiable, it is returned. * * @param coll the collection to decorate, must not be null * @return an unmodifiable collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { if (coll instanceof Unmodifiable) { return coll; } return new UnmodifiableCollection(coll); }
public Iterator iterator() { return UnmodifiableIterator.decorate(getCollection().iterator()); }
public Collection values() { Collection coll = map.values(); return UnmodifiableCollection.decorate(coll); }
/** * Factory method to create an unmodifiable collection. * <p> * If the collection passed in is already unmodifiable, it is returned. * * @param coll the collection to decorate, must not be null * @return an unmodifiable collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { if (coll instanceof Unmodifiable) { return coll; } return new UnmodifiableCollection(coll); }
public Iterator iterator() { return UnmodifiableIterator.decorate(getCollection().iterator()); }
public Collection values() { Collection coll = map.values(); return UnmodifiableCollection.decorate(coll); }
/** * Factory method to create an unmodifiable collection. * <p> * If the collection passed in is already unmodifiable, it is returned. * * @param coll the collection to decorate, must not be null * @return an unmodifiable collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { if (coll instanceof Unmodifiable) { return coll; } return new UnmodifiableCollection(coll); }
public Iterator iterator() { return UnmodifiableIterator.decorate(getCollection().iterator()); }
public Collection values() { Collection coll = map.values(); return UnmodifiableCollection.decorate(coll); }
/** * Factory method to create an unmodifiable collection. * <p> * If the collection passed in is already unmodifiable, it is returned. * * @param coll the collection to decorate, must not be null * @return an unmodifiable collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { if (coll instanceof Unmodifiable) { return coll; } return new UnmodifiableCollection(coll); }
public Iterator iterator() { return UnmodifiableIterator.decorate(getCollection().iterator()); }
public Collection values() { Collection coll = super.values(); return UnmodifiableCollection.decorate(coll); }
/** * Factory method to create an unmodifiable collection. * <p> * If the collection passed in is already unmodifiable, it is returned. * * @param coll the collection to decorate, must not be null * @return an unmodifiable collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { if (coll instanceof Unmodifiable) { return coll; } return new UnmodifiableCollection(coll); }