Class BitIntegerSet
java.lang.Object
com.vladsch.flexmark.experimental.util.collection.BitIntegerSet
- All Implemented Interfaces:
ReversibleIterable<Integer>
,Iterable<Integer>
,Collection<Integer>
,Set<Integer>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int[]
private final @NotNull BitSet
private final boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionBitIntegerSet
(int i) BitIntegerSet
(@NotNull BitIntegerSet other) private
BitIntegerSet
(@NotNull BitIntegerSet other, boolean reversed) BitIntegerSet
(@NotNull BitSet other) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(@org.jetbrains.annotations.NotNull int[] collection, int startIndex) boolean
addAll
(@org.jetbrains.annotations.NotNull int[] collection, int startIndex, int endIndex) boolean
addAll
(int... collection) boolean
addAll
(@NotNull Collection<? extends Integer> collection) @NotNull BitIntegerSet
and
(@NotNull BitIntegerSet set) @NotNull BitIntegerSet
@NotNull BitIntegerSet
andNot
(@NotNull BitIntegerSet set) @NotNull BitIntegerSet
@NotNull BitSet
bitSet()
int
int
cardinality
(int start) int
cardinality
(int start, int end) void
clear()
@NotNull BitIntegerSet
clear
(int i) @NotNull BitIntegerSet
clear
(int i, int i1) boolean
boolean
containsAll
(@NotNull Collection<?> collection) @NotNull BitIntegerSet
flip
(int i) @NotNull BitIntegerSet
flip
(int i, int i1) void
void
forEach
(@NotNull IntConsumer consumer) boolean
get
(int i) @NotNull BitIntegerSet
get
(int i, int i1) boolean
intersects
(BitSet set) boolean
isEmpty()
boolean
@NotNull ReversibleIterator<Integer>
iterator()
int
nextClearBit
(int i) int
nextSetBit
(int i) @NotNull BitIntegerSet
or
(@NotNull BitIntegerSet set) @NotNull BitIntegerSet
int
previousClearBit
(int i) int
previousSetBit
(int i) boolean
boolean
removeAll
(@NotNull Collection<?> collection) boolean
retainAll
(@NotNull Collection<?> collection) @NotNull ReversibleIterable<Integer>
reversed()
@NotNull ReversibleIterator<Integer>
@NotNull BitIntegerSet
set
(int i) @NotNull BitIntegerSet
set
(int i, boolean b) @NotNull BitIntegerSet
set
(int i, int i1) @NotNull BitIntegerSet
set
(int i, int i1, boolean b) int
size()
@NotNull 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[]
@org.jetbrains.annotations.NotNull long[]
static @NotNull BitIntegerSet
valueOf
(@org.jetbrains.annotations.NotNull byte[] bytes) static @NotNull BitIntegerSet
valueOf
(@org.jetbrains.annotations.NotNull long[] longs) static @NotNull BitIntegerSet
valueOf
(@NotNull ByteBuffer buffer) static @NotNull BitIntegerSet
valueOf
(@NotNull LongBuffer buffer) @NotNull BitIntegerSet
xor
(@NotNull BitIntegerSet set) @NotNull BitIntegerSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Field Details
-
EMPTY_INT
public static final int[] EMPTY_INT -
myBits
-
myReversed
private final boolean myReversed
-
-
Constructor Details
-
BitIntegerSet
public BitIntegerSet() -
BitIntegerSet
public BitIntegerSet(int i) -
BitIntegerSet
-
BitIntegerSet
-
BitIntegerSet
-
-
Method Details
-
cardinality
public int cardinality() -
cardinality
public int cardinality(int start) -
cardinality
public int cardinality(int start, int end) -
contains
-
toArray
-
toArray
@NotNull public <T> @NotNull T[] toArray(@NotNull @NotNull T[] array) -
add
-
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
-
containsAll
- Specified by:
containsAll
in interfaceCollection<Integer>
- Specified by:
containsAll
in interfaceSet<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
-
retainAll
-
removeAll
-
forEach
-
forEach
-
size
public int size() -
isEmpty
public boolean isEmpty() -
clear
public void clear() -
valueOf
@NotNull public static @NotNull BitIntegerSet valueOf(@NotNull @org.jetbrains.annotations.NotNull long[] longs) -
valueOf
-
valueOf
@NotNull public static @NotNull BitIntegerSet valueOf(@NotNull @org.jetbrains.annotations.NotNull byte[] bytes) -
valueOf
-
toByteArray
@NotNull public @org.jetbrains.annotations.NotNull byte[] toByteArray() -
toLongArray
@NotNull public @org.jetbrains.annotations.NotNull long[] toLongArray() -
flip
-
flip
-
set
-
set
-
set
-
set
-
clear
-
clear
-
and
-
or
-
xor
-
andNot
-
and
-
or
-
xor
-
andNot
-
get
public boolean get(int i) -
get
-
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
-
bitSet
-
iterator
-
reversed
- Specified by:
reversed
in interfaceReversibleIterable<Integer>
-
isReversed
public boolean isReversed()- Specified by:
isReversed
in interfaceReversibleIterable<Integer>
-
reversedIterator
- Specified by:
reversedIterator
in interfaceReversibleIterable<Integer>
-