Class BitSetIntSet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- org.apache.ignite.internal.util.GridSerializableCollection<Integer>
-
- org.apache.ignite.internal.util.collection.BitSetIntSet
-
- All Implemented Interfaces:
Serializable,Iterable<Integer>,Collection<Integer>,Set<Integer>,IntSet
public class BitSetIntSet extends GridSerializableCollection<Integer> implements IntSet
Set of Integers implementation based on BitSet. Implementation doesn't support negative values and null, cause we can't distinct null from 0 bit in BitSet.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BitSetIntSet()BitSetIntSet(int initCap)BitSetIntSet(int initCap, Collection<Integer> coll)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(int element)Adds the specified element to this set.booleanadd(Integer integer)booleanaddAll(@NotNull Collection<? extends Integer> c)voidclear()booleancontains(int element)Returns true if this set contains the specified element.booleancontains(Object o)booleancontainsAll(@NotNull Collection<?> c)booleanequals(Object o)inthashCode()@NotNull Iterator<Integer>iterator()booleanremove(int element)Removes the specified element from this set.booleanremove(Object o)booleanremoveAll(@NotNull Collection<?> c)booleanretainAll(@NotNull Collection<?> c)Unsupported operation.intsize()int[]toIntArray()Returns array with primitive types-
Methods inherited from class java.util.AbstractCollection
isEmpty, 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, toArray
-
Methods inherited from interface java.util.Set
isEmpty, spliterator, toArray, toArray
-
-
-
-
Constructor Detail
-
BitSetIntSet
public BitSetIntSet()
-
BitSetIntSet
public BitSetIntSet(int initCap)
- Parameters:
initCap- initial capacity.
-
BitSetIntSet
public BitSetIntSet(int initCap, Collection<Integer> coll)- Parameters:
initCap- initial capacity.coll- initial collection.
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfaceCollection<Integer>- Specified by:
sizein interfaceSet<Integer>- Specified by:
sizein classAbstractCollection<Integer>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<Integer>- Specified by:
containsin interfaceSet<Integer>- Overrides:
containsin classAbstractCollection<Integer>
-
contains
public boolean contains(int element)
Returns true if this set contains the specified element.
-
add
public boolean add(Integer integer)
- Specified by:
addin interfaceCollection<Integer>- Specified by:
addin interfaceSet<Integer>- Overrides:
addin classAbstractCollection<Integer>
-
add
public boolean add(int element)
Adds the specified element to this set.
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<Integer>- Specified by:
removein interfaceSet<Integer>- Overrides:
removein classAbstractCollection<Integer>
-
remove
public boolean remove(int element)
Removes the specified element from this set.
-
toIntArray
public int[] toIntArray()
Returns array with primitive types- Specified by:
toIntArrayin interfaceIntSet
-
containsAll
public boolean containsAll(@NotNull @NotNull Collection<?> c)- Specified by:
containsAllin interfaceCollection<Integer>- Specified by:
containsAllin interfaceSet<Integer>- Overrides:
containsAllin classAbstractCollection<Integer>
-
addAll
public boolean addAll(@NotNull @NotNull Collection<? extends Integer> c)- Specified by:
addAllin interfaceCollection<Integer>- Specified by:
addAllin interfaceSet<Integer>- Overrides:
addAllin classAbstractCollection<Integer>
-
retainAll
public boolean retainAll(@NotNull @NotNull Collection<?> c)Unsupported operation.- Specified by:
retainAllin interfaceCollection<Integer>- Specified by:
retainAllin interfaceSet<Integer>- Overrides:
retainAllin classAbstractCollection<Integer>
-
removeAll
public boolean removeAll(@NotNull @NotNull Collection<?> c)- Specified by:
removeAllin interfaceCollection<Integer>- Specified by:
removeAllin interfaceSet<Integer>- Overrides:
removeAllin classAbstractCollection<Integer>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<Integer>- Specified by:
clearin interfaceSet<Integer>- Overrides:
clearin classAbstractCollection<Integer>
-
hashCode
public int hashCode()
-
-