public abstract class SetMapAdapter<E>
extends java.util.AbstractSet<E>
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<E,java.lang.Object> |
map |
Modifier | Constructor and Description |
---|---|
protected |
SetMapAdapter(java.util.Map<E,java.lang.Object> mapImplementation)
Constructs a new, empty set; the backing
HashMap instance has
default initial capacity (16) and load factor (0.75). |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o)
Adds the specified element to this set if it is not already
present.
|
void |
clear()
Removes all of the elements from this set.
|
boolean |
contains(java.lang.Object o)
Returns
true if this set contains the specified element. |
boolean |
isEmpty()
Returns
true if this set contains no elements. |
java.util.Iterator<E> |
iterator()
Returns an iterator over the elements in this set.
|
boolean |
remove(java.lang.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).
|
addAll, containsAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
protected java.util.Map<E,java.lang.Object> map
protected SetMapAdapter(java.util.Map<E,java.lang.Object> mapImplementation)
HashMap
instance has
default initial capacity (16) and load factor (0.75).public java.util.Iterator<E> iterator()
public int size()
public boolean isEmpty()
true
if this set contains no elements.public boolean contains(java.lang.Object o)
true
if this set contains the specified element.public boolean add(E o)
public boolean remove(java.lang.Object o)
Copyright © 2003-present Jodd Team