Class BitIntegerSet
- java.lang.Object
-
- com.vladsch.flexmark.experimental.util.collection.BitIntegerSet
-
- All Implemented Interfaces:
ReversibleIterable<java.lang.Integer>,java.lang.Iterable<java.lang.Integer>,java.util.Collection<java.lang.Integer>,java.util.Set<java.lang.Integer>
public class BitIntegerSet extends java.lang.Object implements java.util.Set<java.lang.Integer>, ReversibleIterable<java.lang.Integer>
-
-
Field Summary
Fields Modifier and Type Field Description static int[]EMPTY_INTprivate @NotNull java.util.BitSetmyBitsprivate booleanmyReversed
-
Constructor Summary
Constructors Modifier Constructor Description BitIntegerSet()BitIntegerSet(int i)BitIntegerSet(@NotNull BitIntegerSet other)privateBitIntegerSet(@NotNull BitIntegerSet other, boolean reversed)BitIntegerSet(@NotNull java.util.BitSet other)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(@NotNull java.lang.Integer item)booleanaddAll(@org.jetbrains.annotations.NotNull int[] collection, int startIndex)booleanaddAll(@org.jetbrains.annotations.NotNull int[] collection, int startIndex, int endIndex)booleanaddAll(int... collection)booleanaddAll(@NotNull java.util.Collection<? extends java.lang.Integer> collection)@NotNull BitIntegerSetand(@NotNull BitIntegerSet set)@NotNull BitIntegerSetand(@NotNull java.util.BitSet set)@NotNull BitIntegerSetandNot(@NotNull BitIntegerSet set)@NotNull BitIntegerSetandNot(@NotNull java.util.BitSet set)@NotNull java.util.BitSetbitSet()intcardinality()intcardinality(int start)intcardinality(int start, int end)voidclear()@NotNull BitIntegerSetclear(int i)@NotNull BitIntegerSetclear(int i, int i1)booleancontains(@Nullable java.lang.Object o)booleancontainsAll(@NotNull java.util.Collection<?> collection)@NotNull BitIntegerSetflip(int i)@NotNull BitIntegerSetflip(int i, int i1)voidforEach(@NotNull java.util.function.Consumer<? super java.lang.Integer> consumer)voidforEach(@NotNull java.util.function.IntConsumer consumer)booleanget(int i)@NotNull BitIntegerSetget(int i, int i1)booleanintersects(java.util.BitSet set)booleanisEmpty()booleanisReversed()@NotNull ReversibleIterator<java.lang.Integer>iterator()intnextClearBit(int i)intnextSetBit(int i)@NotNull BitIntegerSetor(@NotNull BitIntegerSet set)@NotNull BitIntegerSetor(@NotNull java.util.BitSet set)intpreviousClearBit(int i)intpreviousSetBit(int i)booleanremove(@Nullable java.lang.Object o)booleanremoveAll(@NotNull java.util.Collection<?> collection)booleanretainAll(@NotNull java.util.Collection<?> collection)@NotNull ReversibleIterable<java.lang.Integer>reversed()@NotNull ReversibleIterator<java.lang.Integer>reversedIterator()@NotNull BitIntegerSetset(int i)@NotNull BitIntegerSetset(int i, boolean b)@NotNull BitIntegerSetset(int i, int i1)@NotNull BitIntegerSetset(int i, int i1, boolean b)intsize()@NotNull java.lang.Object[]toArray()@org.jetbrains.annotations.NotNull int[]toArray(@org.jetbrains.annotations.Nullable int[] array)@org.jetbrains.annotations.NotNull int[]toArray(@org.jetbrains.annotations.Nullable int[] array, int destinationIndex)<T> @NotNull T[]toArray(@NotNull T[] array)@org.jetbrains.annotations.NotNull byte[]toByteArray()@org.jetbrains.annotations.NotNull long[]toLongArray()static @NotNull BitIntegerSetvalueOf(@org.jetbrains.annotations.NotNull byte[] bytes)static @NotNull BitIntegerSetvalueOf(@org.jetbrains.annotations.NotNull long[] longs)static @NotNull BitIntegerSetvalueOf(@NotNull java.nio.ByteBuffer buffer)static @NotNull BitIntegerSetvalueOf(@NotNull java.nio.LongBuffer buffer)@NotNull BitIntegerSetxor(@NotNull BitIntegerSet set)@NotNull BitIntegerSetxor(@NotNull java.util.BitSet set)
-
-
-
Constructor Detail
-
BitIntegerSet
public BitIntegerSet()
-
BitIntegerSet
public BitIntegerSet(int i)
-
BitIntegerSet
public BitIntegerSet(@NotNull @NotNull java.util.BitSet other)
-
BitIntegerSet
public BitIntegerSet(@NotNull @NotNull BitIntegerSet other)
-
BitIntegerSet
private BitIntegerSet(@NotNull @NotNull BitIntegerSet other, boolean reversed)
-
-
Method Detail
-
cardinality
public int cardinality()
-
cardinality
public int cardinality(int start)
-
cardinality
public int cardinality(int start, int end)
-
contains
public boolean contains(@Nullable @Nullable java.lang.Object o)- Specified by:
containsin interfacejava.util.Collection<java.lang.Integer>- Specified by:
containsin interfacejava.util.Set<java.lang.Integer>
-
toArray
@NotNull public @NotNull java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection<java.lang.Integer>- Specified by:
toArrayin interfacejava.util.Set<java.lang.Integer>
-
toArray
@NotNull public <T> @NotNull T[] toArray(@NotNull @NotNull T[] array)- Specified by:
toArrayin interfacejava.util.Collection<java.lang.Integer>- Specified by:
toArrayin interfacejava.util.Set<java.lang.Integer>
-
add
public boolean add(@NotNull @NotNull java.lang.Integer item)- Specified by:
addin interfacejava.util.Collection<java.lang.Integer>- Specified by:
addin interfacejava.util.Set<java.lang.Integer>
-
toArray
@NotNull public @org.jetbrains.annotations.NotNull int[] toArray(@Nullable @org.jetbrains.annotations.Nullable int[] array)
-
toArray
@NotNull public @org.jetbrains.annotations.NotNull int[] toArray(@Nullable @org.jetbrains.annotations.Nullable int[] array, int destinationIndex)
-
remove
public boolean remove(@Nullable @Nullable java.lang.Object o)- Specified by:
removein interfacejava.util.Collection<java.lang.Integer>- Specified by:
removein interfacejava.util.Set<java.lang.Integer>
-
containsAll
public boolean containsAll(@NotNull @NotNull java.util.Collection<?> collection)- Specified by:
containsAllin interfacejava.util.Collection<java.lang.Integer>- Specified by:
containsAllin interfacejava.util.Set<java.lang.Integer>
-
addAll
public boolean addAll(int... collection)
-
addAll
public boolean addAll(@NotNull @org.jetbrains.annotations.NotNull int[] collection, int startIndex)
-
addAll
public boolean addAll(@NotNull @org.jetbrains.annotations.NotNull int[] collection, int startIndex, int endIndex)
-
addAll
public boolean addAll(@NotNull @NotNull java.util.Collection<? extends java.lang.Integer> collection)- Specified by:
addAllin interfacejava.util.Collection<java.lang.Integer>- Specified by:
addAllin interfacejava.util.Set<java.lang.Integer>
-
retainAll
public boolean retainAll(@NotNull @NotNull java.util.Collection<?> collection)- Specified by:
retainAllin interfacejava.util.Collection<java.lang.Integer>- Specified by:
retainAllin interfacejava.util.Set<java.lang.Integer>
-
removeAll
public boolean removeAll(@NotNull @NotNull java.util.Collection<?> collection)- Specified by:
removeAllin interfacejava.util.Collection<java.lang.Integer>- Specified by:
removeAllin interfacejava.util.Set<java.lang.Integer>
-
forEach
public void forEach(@NotNull @NotNull java.util.function.Consumer<? super java.lang.Integer> consumer)- Specified by:
forEachin interfacejava.lang.Iterable<java.lang.Integer>
-
forEach
public void forEach(@NotNull @NotNull java.util.function.IntConsumer consumer)
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<java.lang.Integer>- Specified by:
sizein interfacejava.util.Set<java.lang.Integer>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<java.lang.Integer>- Specified by:
isEmptyin interfacejava.util.Set<java.lang.Integer>
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<java.lang.Integer>- Specified by:
clearin interfacejava.util.Set<java.lang.Integer>
-
valueOf
@NotNull public static @NotNull BitIntegerSet valueOf(@NotNull @org.jetbrains.annotations.NotNull long[] longs)
-
valueOf
@NotNull public static @NotNull BitIntegerSet valueOf(@NotNull @NotNull java.nio.LongBuffer buffer)
-
valueOf
@NotNull public static @NotNull BitIntegerSet valueOf(@NotNull @org.jetbrains.annotations.NotNull byte[] bytes)
-
valueOf
@NotNull public static @NotNull BitIntegerSet valueOf(@NotNull @NotNull java.nio.ByteBuffer buffer)
-
toByteArray
@NotNull public @org.jetbrains.annotations.NotNull byte[] toByteArray()
-
toLongArray
@NotNull public @org.jetbrains.annotations.NotNull long[] toLongArray()
-
flip
@NotNull public @NotNull BitIntegerSet flip(int i)
-
flip
@NotNull public @NotNull BitIntegerSet flip(int i, int i1)
-
set
@NotNull public @NotNull BitIntegerSet set(int i)
-
set
@NotNull public @NotNull BitIntegerSet set(int i, boolean b)
-
set
@NotNull public @NotNull BitIntegerSet set(int i, int i1)
-
set
@NotNull public @NotNull BitIntegerSet set(int i, int i1, boolean b)
-
clear
@NotNull public @NotNull BitIntegerSet clear(int i)
-
clear
@NotNull public @NotNull BitIntegerSet clear(int i, int i1)
-
and
@NotNull public @NotNull BitIntegerSet and(@NotNull @NotNull java.util.BitSet set)
-
or
@NotNull public @NotNull BitIntegerSet or(@NotNull @NotNull java.util.BitSet set)
-
xor
@NotNull public @NotNull BitIntegerSet xor(@NotNull @NotNull java.util.BitSet set)
-
andNot
@NotNull public @NotNull BitIntegerSet andNot(@NotNull @NotNull java.util.BitSet set)
-
and
@NotNull public @NotNull BitIntegerSet and(@NotNull @NotNull BitIntegerSet set)
-
or
@NotNull public @NotNull BitIntegerSet or(@NotNull @NotNull BitIntegerSet set)
-
xor
@NotNull public @NotNull BitIntegerSet xor(@NotNull @NotNull BitIntegerSet set)
-
andNot
@NotNull public @NotNull BitIntegerSet andNot(@NotNull @NotNull BitIntegerSet set)
-
get
public boolean get(int i)
-
get
@NotNull public @NotNull BitIntegerSet get(int i, int i1)
-
nextSetBit
public int nextSetBit(int i)
-
nextClearBit
public int nextClearBit(int i)
-
previousSetBit
public int previousSetBit(int i)
-
previousClearBit
public int previousClearBit(int i)
-
intersects
public boolean intersects(java.util.BitSet set)
-
bitSet
@NotNull public @NotNull java.util.BitSet bitSet()
-
iterator
@NotNull public @NotNull ReversibleIterator<java.lang.Integer> iterator()
- Specified by:
iteratorin interfacejava.util.Collection<java.lang.Integer>- Specified by:
iteratorin interfacejava.lang.Iterable<java.lang.Integer>- Specified by:
iteratorin interfaceReversibleIterable<java.lang.Integer>- Specified by:
iteratorin interfacejava.util.Set<java.lang.Integer>
-
reversed
@NotNull public @NotNull ReversibleIterable<java.lang.Integer> reversed()
- Specified by:
reversedin interfaceReversibleIterable<java.lang.Integer>
-
isReversed
public boolean isReversed()
- Specified by:
isReversedin interfaceReversibleIterable<java.lang.Integer>
-
reversedIterator
@NotNull public @NotNull ReversibleIterator<java.lang.Integer> reversedIterator()
- Specified by:
reversedIteratorin interfaceReversibleIterable<java.lang.Integer>
-
-