Class PositiveIntSet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<Integer>
-
- net.automatalib.common.util.collection.PositiveIntSet
-
public class PositiveIntSet extends AbstractSet<Integer>
-
-
Constructor Summary
Constructors Constructor Description PositiveIntSet()
Default constructor for a mutablePositiveIntSet
.PositiveIntSet(BitSet delegate)
Default constructor for an immutable view of a givenBitSet
.PositiveIntSet(BitSet delegate, boolean immutable)
Constructor for a(n) (immutable) view of a givenPositiveIntSet
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(Integer integer)
boolean
addInt(int integer)
void
clear()
boolean
contains(@Nullable Object o)
boolean
containsInt(int integer)
boolean
isEmpty()
BitSetIterator
iterator()
boolean
remove(@Nullable Object o)
boolean
removeInt(int integer)
int
size()
-
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from interface java.util.Set
addAll, containsAll, retainAll, spliterator, toArray, toArray
-
-
-
-
Constructor Detail
-
PositiveIntSet
public PositiveIntSet()
Default constructor for a mutablePositiveIntSet
.
-
PositiveIntSet
public PositiveIntSet(BitSet delegate)
Default constructor for an immutable view of a givenBitSet
.- Parameters:
delegate
- the backingBitSet
-
PositiveIntSet
public PositiveIntSet(BitSet delegate, boolean immutable)
Constructor for a(n) (immutable) view of a givenPositiveIntSet
.
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfaceCollection<Integer>
- Specified by:
size
in interfaceSet<Integer>
- Specified by:
size
in classAbstractCollection<Integer>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<Integer>
- Specified by:
isEmpty
in interfaceSet<Integer>
- Overrides:
isEmpty
in classAbstractCollection<Integer>
-
contains
public boolean contains(@Nullable Object o)
- Specified by:
contains
in interfaceCollection<Integer>
- Specified by:
contains
in interfaceSet<Integer>
- Overrides:
contains
in classAbstractCollection<Integer>
-
containsInt
public boolean containsInt(int integer)
-
iterator
public BitSetIterator iterator()
-
add
public boolean add(Integer integer)
- Specified by:
add
in interfaceCollection<Integer>
- Specified by:
add
in interfaceSet<Integer>
- Overrides:
add
in classAbstractCollection<Integer>
-
addInt
public boolean addInt(int integer)
-
remove
public boolean remove(@Nullable Object o)
- Specified by:
remove
in interfaceCollection<Integer>
- Specified by:
remove
in interfaceSet<Integer>
- Overrides:
remove
in classAbstractCollection<Integer>
-
removeInt
public boolean removeInt(int integer)
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<Integer>
- Specified by:
clear
in interfaceSet<Integer>
- Overrides:
clear
in classAbstractCollection<Integer>
-
-