Class CaseInsensitiveHashSet

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

    public class CaseInsensitiveHashSet
    extends java.util.HashSet<java.lang.String>
    Set implementation that is case insensitive.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CaseInsensitiveHashSet​(java.util.Collection<? extends java.lang.String> source)
      Constructor initializing the set with the given collection.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(java.lang.String element)  
      boolean contains​(java.lang.Object o)  
      boolean contains​(java.lang.String element)
      Verify containment by ignoring case.
      • Methods inherited from class java.util.HashSet

        clear, clone, isEmpty, iterator, remove, size, spliterator
      • 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, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
    • Constructor Detail

      • CaseInsensitiveHashSet

        public CaseInsensitiveHashSet​(java.util.Collection<? extends java.lang.String> source)
        Constructor initializing the set with the given collection.
        Parameters:
        source - The source collection to use for initialization.
    • Method Detail

      • add

        public boolean add​(java.lang.String element)
        Specified by:
        add in interface java.util.Collection<java.lang.String>
        Specified by:
        add in interface java.util.Set<java.lang.String>
        Overrides:
        add in class java.util.HashSet<java.lang.String>
      • contains

        public boolean contains​(java.lang.String element)
        Verify containment by ignoring case.
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<java.lang.String>
        Specified by:
        contains in interface java.util.Set<java.lang.String>
        Overrides:
        contains in class java.util.HashSet<java.lang.String>