Package net.sf.tweety.arg.adf.util
Class UnionSetView<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- net.sf.tweety.arg.adf.util.AbstractUnmodifiableSet<E>
-
- net.sf.tweety.arg.adf.util.UnionSetView<E>
-
- Type Parameters:
E- the elements
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>
public final class UnionSetView<E> extends AbstractUnmodifiableSet<E>
- Author:
- Mathias Hofer
-
-
Constructor Summary
Constructors Constructor Description UnionSetView(Set<E> set1, Set<E> set2)Expects the two sets to be disjoint, otherwise some methods, e.g.
-
Method Summary
-
Methods inherited from class net.sf.tweety.arg.adf.util.AbstractUnmodifiableSet
add, addAll, clear, remove, removeAll, removeIf, retainAll
-
Methods inherited from class java.util.AbstractSet
equals, hashCode
-
Methods inherited from class java.util.AbstractCollection
toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.Set
spliterator
-
-
-
-
Constructor Detail
-
UnionSetView
public UnionSetView(Set<E> set1, Set<E> set2)
Expects the two sets to be disjoint, otherwise some methods, e.g.size(), will return unreasonable results.It is up to the caller to ensure this property, this class performs no additional checks.
- Parameters:
set1- the first setset2- the second set
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein interfaceSet<E>- Specified by:
sizein classAbstractCollection<E>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<E>- Specified by:
isEmptyin interfaceSet<E>- Overrides:
isEmptyin classAbstractCollection<E>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<E>- Specified by:
containsin interfaceSet<E>- Overrides:
containsin classAbstractCollection<E>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<E>- Specified by:
toArrayin interfaceSet<E>- Overrides:
toArrayin classAbstractCollection<E>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<E>- Specified by:
toArrayin interfaceSet<E>- Overrides:
toArrayin classAbstractCollection<E>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>- Overrides:
containsAllin classAbstractCollection<E>
-
-