Class AdaptedSetCollection<T,V>
java.lang.Object
com.fastasyncworldedit.core.util.collection.AdaptedSetCollection<T,V>
- All Implemented Interfaces:
Iterable<V>
,Collection<V>
,Set<V>
Adapt a collection to a set.
It's assumed that the collection is set like, otherwise behavior will be weird
-
Constructor Summary
ConstructorDescriptionAdaptedSetCollection
(Collection<T> collection, com.google.common.base.Function<T, V> adapter) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends V> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) boolean
void
int
hashCode()
boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
boolean
retainAll
(Collection<?> c) int
size()
stream()
Object[]
toArray()
<V> V[]
toArray
(V[] a) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
toArray
-
Constructor Details
-
AdaptedSetCollection
-
-
Method Details
-
getOriginal
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
@Nonnull public <V> V[] toArray(@Nonnull V[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceSet<T>
-
addAll
-
removeAll
-
removeIf
- Specified by:
removeIf
in interfaceCollection<T>
-
retainAll
-
clear
public void clear() -
equals
-
hashCode
public int hashCode() -
spliterator
- Specified by:
spliterator
in interfaceCollection<T>
- Specified by:
spliterator
in interfaceIterable<T>
- Specified by:
spliterator
in interfaceSet<T>
-
stream
- Specified by:
stream
in interfaceCollection<T>
-
parallelStream
- Specified by:
parallelStream
in interfaceCollection<T>
-
forEach
-