|
com.im.commons 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<String>
com.im.commons.util.CaseInsensitiveSet
public class CaseInsensitiveSet
| Constructor Summary | |
|---|---|
CaseInsensitiveSet()
Constructs a new, empty set; the backing HashMap instance has default initial capacity (16) and load factor (0.75). |
|
CaseInsensitiveSet(Collection c)
Constructs a new set containing the elements in the specified collection. |
|
CaseInsensitiveSet(int initialCapacity)
Constructs a new, empty set; the backing HashMap instance has the specified initial capacity and default load factor, which is 0.75. |
|
CaseInsensitiveSet(int initialCapacity,
float loadFactor)
Constructs a new, empty set; the backing HashMap instance has the specified initial capacity and the specified load factor. |
|
| Method Summary | |
|---|---|
boolean |
add(String o)
Adds the specified element to this set if it is not already present. |
void |
clear()
Removes all of the elements from this set. |
Object |
clone()
Returns a shallow copy of this HashSet instance: the elements themselves are not cloned. |
boolean |
contains(Object o)
Returns true if this set contains the specified element. |
boolean |
isEmpty()
Returns true if this set contains no elements. |
Iterator<String> |
iterator()
Returns an iterator over the elements in this set. |
boolean |
remove(Object o)
Removes the specified element from this set if it is present. |
int |
size()
Returns the number of elements in this set (its cardinality). |
| 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, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public CaseInsensitiveSet()
public CaseInsensitiveSet(Collection c)
c - The collection whose elements are to be placed into this set.
NullPointerException - if the specified collection is null.
public CaseInsensitiveSet(int initialCapacity,
float loadFactor)
initialCapacity - The initial capacity of the hash map.loadFactor - The load factor of the hash map.
IllegalArgumentException - if the initial capacity is less
than zero, or if the load factor is nonpositive.public CaseInsensitiveSet(int initialCapacity)
initialCapacity - The initial capacity of the hash table.
IllegalArgumentException - if the initial capacity is less
than zero.| Method Detail |
|---|
public Iterator<String> iterator()
iterator in interface Iterable<String>iterator in interface Collection<String>iterator in interface Set<String>iterator in class AbstractCollection<String>ConcurrentModificationExceptionpublic int size()
size in interface Collection<String>size in interface Set<String>size in class AbstractCollection<String>public boolean isEmpty()
isEmpty in interface Collection<String>isEmpty in interface Set<String>isEmpty in class AbstractCollection<String>public boolean contains(Object o)
contains in interface Collection<String>contains in interface Set<String>contains in class AbstractCollection<String>o - The e lement whose presence in this set is to be tested.
public boolean add(String o)
add in interface Collection<String>add in interface Set<String>add in class AbstractCollection<String>o - The e lement to be added to this set.
public boolean remove(Object o)
remove in interface Collection<String>remove in interface Set<String>remove in class AbstractCollection<String>o - The o bject to be removed from this set, if present.
public void clear()
clear in interface Collection<String>clear in interface Set<String>clear in class AbstractCollection<String>public Object clone()
clone in class Object
|
com.im.commons 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||