public class SetFromLiveMap<E>
extends java.util.AbstractSet<E>
implements java.util.Set<E>, java.io.Serializable
Map.keySet()
for the contents of the set).
As Collections.newSetFromMap(Map)
and guava's Sets.newSetFromMap(Map)
, but accepts
a non-empty map. Also supports others modifying the backing map simultaneously, if the backing map
is a ConcurrentMap.
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
static <E> java.util.Set<E> |
create(java.util.Map<E,java.lang.Boolean> map) |
boolean |
equals(java.lang.Object object) |
int |
hashCode() |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
public static <E> java.util.Set<E> create(java.util.Map<E,java.lang.Boolean> map)
public void clear()
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public boolean remove(java.lang.Object o)
public boolean add(E e)
public java.util.Iterator<E> iterator()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
public java.lang.String toString()
toString
in class java.util.AbstractCollection<E>
public int hashCode()
public boolean equals(@Nullable java.lang.Object object)
public boolean containsAll(java.util.Collection<?> c)
public boolean removeAll(java.util.Collection<?> c)