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:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.Set<E>
public final class UnionSetView<E> extends AbstractUnmodifiableSet<E>
- Author:
- Mathias Hofer
-
-
Constructor Summary
Constructors Constructor Description UnionSetView(java.util.Set<E> set1, java.util.Set<E> set2)Expects the two sets to be disjoint, otherwise some methods, e.g.
-
Method Summary
Modifier and Type Method Description booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)booleanisEmpty()java.util.Iterator<E>iterator()static <E> java.util.Set<E>of(java.util.Set<E> set1, java.util.Set<E> set2, java.util.Set<E> set3)intsize()java.lang.Object[]toArray()<T> T[]toArray(T[] a)
-
-
-
Constructor Detail
-
UnionSetView
public UnionSetView(java.util.Set<E> set1, java.util.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
-
of
public static <E> java.util.Set<E> of(java.util.Set<E> set1, java.util.Set<E> set2, java.util.Set<E> set3)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(java.lang.Object o)
-
iterator
public java.util.Iterator<E> iterator()
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
-