Package com.im.commons.util
Class CaseInsensitiveSet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- java.util.TreeSet<java.lang.String>
-
- com.im.commons.util.CaseInsensitiveSet
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<java.lang.String>
,java.util.Collection<java.lang.String>
,java.util.NavigableSet<java.lang.String>
,java.util.Set<java.lang.String>
,java.util.SortedSet<java.lang.String>
public class CaseInsensitiveSet extends java.util.TreeSet<java.lang.String> implements java.io.Serializable
The class extends fromTreeSet
with comparatorString.CASE_INSENSITIVE_ORDER
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CaseInsensitiveSet()
Constructs a new empty set.CaseInsensitiveSet(int initialCapacity)
Deprecated.The backing map is any no more HashMap.CaseInsensitiveSet(int initialCapacity, float loadFactor)
Deprecated.The backing map is any no more HashMap.CaseInsensitiveSet(java.util.Collection c)
Constructs a new set with initial data.
-
Method Summary
-
Methods inherited from class java.util.TreeSet
add, addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, spliterator, subSet, subSet, tailSet, tailSet
-
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
CaseInsensitiveSet
public CaseInsensitiveSet()
Constructs a new empty set.
-
CaseInsensitiveSet
public CaseInsensitiveSet(java.util.Collection c)
Constructs a new set with initial data.- Parameters:
c
- The collection whose elements are to be placed into this set.- Throws:
java.lang.NullPointerException
- if the specified collection is null.
-
CaseInsensitiveSet
@Deprecated public CaseInsensitiveSet(int initialCapacity, float loadFactor)
Deprecated.The backing map is any no more HashMap. The class extendsTreeSet
.Constructs a new, empty set; the backingHashMap
instance has the specified initial capacity and the specified load factor.- Parameters:
initialCapacity
- The initial capacity of the hash map.loadFactor
- The load factor of the hash map.- Throws:
java.lang.IllegalArgumentException
- if the initial capacity is less than zero, or if the load factor is nonpositive.
-
CaseInsensitiveSet
@Deprecated public CaseInsensitiveSet(int initialCapacity)
Deprecated.The backing map is any no more HashMap. The class extendsTreeSet
.Constructs a new, empty set; the backingHashMap
instance has the specified initial capacity and default load factor, which is0.75
.- Parameters:
initialCapacity
- The initial capacity of the hash table.- Throws:
java.lang.IllegalArgumentException
- if the initial capacity is less than zero.
-
-