Class LinkedHashSetWithoutNull<T>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.Set<T>

    public class LinkedHashSetWithoutNull<T>
    extends java.util.LinkedHashSet<T>
    A linked hash set specialization that will refuse to add null values. It is notable that this implementation intentionally violates the specification of Collection.add(Object) thus it should be used with caution.
    Since:
    2.9
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(T e)  
      • Methods inherited from class java.util.LinkedHashSet

        spliterator
      • Methods inherited from class java.util.HashSet

        clear, clone, contains, isEmpty, iterator, remove, size
      • Methods inherited from class java.util.AbstractSet

        equals, hashCode, removeAll
      • Methods inherited from class java.util.AbstractCollection

        addAll, containsAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Set

        addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
    • Constructor Detail

      • LinkedHashSetWithoutNull

        public LinkedHashSetWithoutNull()
    • Method Detail

      • add

        public boolean add​(T e)
        Specified by:
        add in interface java.util.Collection<T>
        Specified by:
        add in interface java.util.Set<T>
        Overrides:
        add in class java.util.HashSet<T>