org.restlet.engine.util
Class CaseInsensitiveHashSet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.HashSet<String>
              extended by org.restlet.engine.util.CaseInsensitiveHashSet
All Implemented Interfaces:
Serializable, Cloneable, Iterable<String>, Collection<String>, Set<String>

public class CaseInsensitiveHashSet
extends HashSet<String>

Set implementation that is case insensitive.

See Also:
Serialized Form

Constructor Summary
CaseInsensitiveHashSet(Collection<? extends String> source)
          Constructor initializing the set with the given collection.
 
Method Summary
 boolean add(String element)
           
 boolean contains(String element)
          Verify containment by ignoring case.
 
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.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

CaseInsensitiveHashSet

public CaseInsensitiveHashSet(Collection<? extends 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(String element)
Specified by:
add in interface Collection<String>
Specified by:
add in interface Set<String>
Overrides:
add in class HashSet<String>

contains

public boolean contains(String element)
Verify containment by ignoring case.



Copyright © 2005-2013 Restlet.