E
- The element stored in the setpublic class MapBackedSet<E> extends AbstractSet<E> implements Serializable
Constructor and Description |
---|
MapBackedSet(Map<E,Boolean> map)
Creates a new MapBackedSet instance
|
MapBackedSet(Map<E,Boolean> map,
Collection<E> c)
Creates a new MapBackedSet instance
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
void |
clear() |
boolean |
contains(Object o) |
Iterator<E> |
iterator() |
boolean |
remove(Object o) |
int |
size() |
equals, hashCode, removeAll
addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public MapBackedSet(Map<E,Boolean> map)
map
- The map that we want to backpublic MapBackedSet(Map<E,Boolean> map, Collection<E> c)
map
- The map that we want to backc
- The elements we want to add in the mappublic int size()
size
in interface Collection<E>
size
in interface Set<E>
size
in class AbstractCollection<E>
public boolean contains(Object o)
contains
in interface Collection<E>
contains
in interface Set<E>
contains
in class AbstractCollection<E>
public boolean add(E o)
add
in interface Collection<E>
add
in interface Set<E>
add
in class AbstractCollection<E>
public boolean remove(Object o)
remove
in interface Collection<E>
remove
in interface Set<E>
remove
in class AbstractCollection<E>
public void clear()
clear
in interface Collection<E>
clear
in interface Set<E>
clear
in class AbstractCollection<E>
Copyright © 2004–2021 Apache MINA Project. All rights reserved.