Class UnmodifiableSet<E>

    • Method Detail

      • unmodifiableSet

        public static <E> Set<E> unmodifiableSet(Set<? extends E> set)
        Factory method to create an unmodifiable set.
        Type Parameters:
        E - the element type
        Parameters:
        set - the set to decorate, must not be null
        Returns:
        a new unmodifiable set
        Throws:
        NullPointerException - if set 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)