Class UnmodifiableCollection<E>

    • Method Detail

      • unmodifiableCollection

        public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> coll)
        Factory method to create an unmodifiable collection.

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

        Type Parameters:
        T - the type of the elements in the collection
        Parameters:
        coll - the collection to decorate, must not be null
        Returns:
        an unmodifiable collection
        Throws:
        NullPointerException - if collection is null
        Since:
        4.0
      • add

        public boolean add(E object)
      • addAll

        public boolean addAll(Collection<? extends E> coll)
      • clear

        public void clear()
      • remove

        public boolean remove(Object object)
      • removeAll

        public boolean removeAll(Collection<?> coll)
      • retainAll

        public boolean retainAll(Collection<?> coll)