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 BitSetprivate final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionBitIntegerSet(int i) BitIntegerSet(@NotNull BitIntegerSet other) privateBitIntegerSet(@NotNull BitIntegerSet other, boolean reversed) BitIntegerSet(@NotNull BitSet other) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(@NotNull int[] collection, int startIndex) booleanaddAll(@NotNull int[] collection, int startIndex, int endIndex) booleanaddAll(int... collection) booleanaddAll(@NotNull Collection<? extends Integer> collection) @NotNull BitIntegerSetand(@NotNull BitIntegerSet set) @NotNull BitIntegerSet@NotNull BitIntegerSetandNot(@NotNull BitIntegerSet set) @NotNull BitIntegerSet@NotNull BitSetbitSet()intintcardinality(int start) intcardinality(int start, int end) voidclear()@NotNull BitIntegerSetclear(int i) @NotNull BitIntegerSetclear(int i, int i1) booleanbooleancontainsAll(@NotNull Collection<?> collection) @NotNull BitIntegerSetflip(int i) @NotNull BitIntegerSetflip(int i, int i1) voidvoidforEach(@NotNull IntConsumer consumer) booleanget(int i) @NotNull BitIntegerSetget(int i, int i1) booleanintersects(BitSet set) booleanisEmpty()boolean@NotNull ReversibleIterator<Integer> iterator()intnextClearBit(int i) intnextSetBit(int i) @NotNull BitIntegerSetor(@NotNull BitIntegerSet set) @NotNull BitIntegerSetintpreviousClearBit(int i) intpreviousSetBit(int i) booleanbooleanremoveAll(@NotNull Collection<?> collection) booleanretainAll(@NotNull Collection<?> collection) @NotNull ReversibleIterable<Integer> reversed()@NotNull ReversibleIterator<Integer> @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 Object[]toArray()@NotNull int[]toArray(@Nullable int[] array) @NotNull int[]toArray(@Nullable int[] array, int destinationIndex) <T> T[]toArray(T[] array) @NotNull byte[]@NotNull long[]static @NotNull BitIntegerSetvalueOf(@NotNull byte[] bytes) static @NotNull BitIntegerSetvalueOf(@NotNull long[] longs) static @NotNull BitIntegerSetvalueOf(@NotNull ByteBuffer buffer) static @NotNull BitIntegerSetvalueOf(@NotNull LongBuffer buffer) @NotNull BitIntegerSetxor(@NotNull BitIntegerSet set) @NotNull BitIntegerSetMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface 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
-
add
-
toArray
@NotNull public @NotNull int[] toArray(@Nullable @Nullable int[] array) -
toArray
@NotNull public @NotNull int[] toArray(@Nullable @Nullable int[] array, int destinationIndex) -
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<Integer>- Specified by:
containsAllin interfaceSet<Integer>
-
addAll
public boolean addAll(int... collection) -
addAll
public boolean addAll(@NotNull @NotNull int[] collection, int startIndex) -
addAll
public boolean addAll(@NotNull @NotNull int[] collection, int startIndex, int endIndex) -
addAll
-
retainAll
-
removeAll
-
forEach
-
forEach
-
size
-
isEmpty
-
clear
-
valueOf
-
valueOf
-
valueOf
-
valueOf
-
toByteArray
@NotNull public @NotNull byte[] toByteArray() -
toLongArray
@NotNull public @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:
reversedin interfaceReversibleIterable<Integer>
-
isReversed
public boolean isReversed()- Specified by:
isReversedin interfaceReversibleIterable<Integer>
-
reversedIterator
- Specified by:
reversedIteratorin interfaceReversibleIterable<Integer>
-