Package org.tweetyproject.arg.adf.util
Class MinusSetView<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- org.tweetyproject.arg.adf.util.AbstractUnmodifiableCollection<E>
-
- org.tweetyproject.arg.adf.util.MinusSetView<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.Set<E>
public final class MinusSetView<E> extends AbstractUnmodifiableCollection<E> implements java.util.Set<E>
- Author:
- Mathias Hofer
-
-
Constructor Summary
Constructors Constructor Description MinusSetView(java.util.Set<E> superset, java.util.Set<E> subset)Constructs a view of the result of superset - subset.
-
-
-
Constructor Detail
-
MinusSetView
public MinusSetView(java.util.Set<E> superset, java.util.Set<E> subset)
Constructs a view of the result of superset - subset.As the name suggests, it is expected that all elements of
subsetare contained insuperset, otherwise one has to expect unreasonable results.It is up to the caller to ensure this property, this class performs no additional checks.
- Parameters:
superset- the minuendsubset- the subtrahend
-
-
Method Detail
-
of
public static <E> java.util.Set<E> of(java.util.Set<E> superset, E subtrahend)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(java.lang.Object o)
-
iterator
public java.util.Iterator<E> iterator()
-
-