Class AbstractSetDecorator<E>

  • Type Parameters:
    E - the type of the elements in this set
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.Set<E>
    Direct Known Subclasses:
    AbstractSerializableSetDecorator, UnmodifiableEntrySet

    public abstract class AbstractSetDecorator<E>
    extends AbstractCollectionDecorator<E>
    implements java.util.Set<E>
    Decorates another Set to provide additional behaviour.

    Methods are forwarded directly to the decorated set.

    Since:
    3.0
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractSetDecorator

        protected AbstractSetDecorator()
        Constructor only used in deserialization, do not use otherwise.
        Since:
        3.1
      • AbstractSetDecorator

        protected AbstractSetDecorator​(java.util.Set<E> set)
        Constructor that wraps (not copies).
        Parameters:
        set - the set to decorate, must not be null
        Throws:
        java.lang.NullPointerException - if set is null
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object object)
        Specified by:
        equals in interface java.util.Collection<E>
        Specified by:
        equals in interface java.util.Set<E>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<E>
        Specified by:
        hashCode in interface java.util.Set<E>
        Overrides:
        hashCode in class java.lang.Object