|
Joda System API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractSet
|
+--org.joda.util.IdentityBasedHashSet
Set based on Hash principles which check for equality, not equals. This is probably not terribly efficient!
| Nested Class Summary | |
static class |
IdentityBasedHashSet.Entry
Hash entry. |
| Constructor Summary | |
IdentityBasedHashSet()
Constructs a new, empty set with a default capacity and load factor, which is 0.75. |
|
IdentityBasedHashSet(java.util.Collection coll)
Constructs a new set with the same mappings as the given map. |
|
IdentityBasedHashSet(int initialCapacity)
Constructs a new, empty map with the specified initial capacity and default load factor, which is 0.75. |
|
IdentityBasedHashSet(int initialCapacity,
float loadFactor)
Constructs a new, empty set with the specified initial capacity and the specified load factor. |
|
| Method Summary | |
boolean |
add(java.lang.Object obj)
Adds the specified value to the set. |
void |
clear()
Removes all values from this set. |
java.lang.Object |
clone()
Returns a shallow copy of this set instance: the values themselves are not cloned. |
boolean |
contains(java.lang.Object obj)
Returns true if this set contains the object. |
boolean |
isEmpty()
Returns true if the size is 0. |
java.util.Iterator |
iterator()
Get an iterator accross the set |
boolean |
remove(java.lang.Object key)
Removes the mapping for this key from this map if present. |
int |
size()
Returns the size of the set. |
| 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 IdentityBasedHashSet(int initialCapacity,
float loadFactor)
initialCapacity - the initial capacity of the set.loadFactor - the load factor of the set
java.lang.IllegalArgumentException - if the initial capacity is less
than zero, or if the load factor is nonpositive.public IdentityBasedHashSet(int initialCapacity)
initialCapacity - the initial capacity of the HashMap.
java.lang.IllegalArgumentException - if the initial capacity is less
than zero.public IdentityBasedHashSet()
public IdentityBasedHashSet(java.util.Collection coll)
| Method Detail |
public int size()
size in interface java.util.Setsize in class java.util.AbstractCollectionpublic boolean isEmpty()
isEmpty in interface java.util.SetisEmpty in class java.util.AbstractCollectionpublic boolean contains(java.lang.Object obj)
contains in interface java.util.Setcontains in class java.util.AbstractCollectionobj - the object to check for
public boolean add(java.lang.Object obj)
add in interface java.util.Setadd in class java.util.AbstractCollectionobj - object to add
public boolean remove(java.lang.Object key)
remove in interface java.util.Setremove in class java.util.AbstractCollectionkey - key whose mapping is to be removed from the map.
public void clear()
clear in interface java.util.Setclear in class java.util.AbstractCollectionpublic java.lang.Object clone()
clone in class java.lang.Objectpublic java.util.Iterator iterator()
iterator in interface java.util.Setiterator in class java.util.AbstractCollection
|
Joda System API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||