public abstract class ScopedSet<S extends ScopedSet<S,T>,T> extends java.lang.Object implements SetDecorator<T>, Scoped<S>, Copyable<S>
| Modifier | Constructor and Description |
|---|---|
|
ScopedSet(java.util.Set<T> component) |
protected |
ScopedSet(S parent,
java.util.Set<T> component) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T e) |
boolean |
addAll(java.util.Collection<? extends T> c) |
void |
collapseIntoParentScope()
Collapse this scope into its parent.
|
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
equals(java.lang.Object obj) |
java.util.Set<T> |
getComponent() |
java.util.Optional<S> |
getParentScope() |
int |
hashCode() |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
static <T> ScopedSet<?,T> |
over(java.util.function.Supplier<? extends java.util.Set<T>> componentFactory) |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitaccumulatingSet, clear, over, remove, removeAll, retainAll, size, toArray, toArraynestChildScopepublic ScopedSet(java.util.Set<T> component)
public java.util.Set<T> getComponent()
getComponent in interface CollectionDecorator<java.util.Set<T>,T>getComponent in interface SetDecorator<T>public static <T> ScopedSet<?,T> over(java.util.function.Supplier<? extends java.util.Set<T>> componentFactory)
public boolean add(T e)
add in interface java.util.Collection<T>add in interface java.util.Set<T>add in interface CollectionDecorator<java.util.Set<T>,T>add in interface SetDecorator<T>public boolean addAll(java.util.Collection<? extends T> c)
addAll in interface java.util.Collection<T>addAll in interface java.util.Set<T>addAll in interface CollectionDecorator<java.util.Set<T>,T>addAll in interface SetDecorator<T>public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<T>contains in interface java.util.Set<T>contains in interface CollectionDecorator<java.util.Set<T>,T>contains in interface SetDecorator<T>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<T>containsAll in interface java.util.Set<T>containsAll in interface CollectionDecorator<java.util.Set<T>,T>containsAll in interface SetDecorator<T>public java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T>iterator in interface java.util.Collection<T>iterator in interface java.util.Set<T>iterator in interface CollectionDecorator<java.util.Set<T>,T>iterator in interface SetDecorator<T>public boolean isEmpty()
isEmpty in interface java.util.Collection<T>isEmpty in interface java.util.Set<T>isEmpty in interface CollectionDecorator<java.util.Set<T>,T>isEmpty in interface SetDecorator<T>public java.util.Optional<S> getParentScope()
public void collapseIntoParentScope()
Scopedpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()