public interface RBitSet extends RExpirable, RBitSetAsync
| Modifier and Type | Method and Description |
|---|---|
void |
and(String... bitSetNames)
Executes AND operation over this object and specified bitsets.
|
BitSet |
asBitSet() |
long |
cardinality()
Returns the number of bits set to one.
|
void |
clear()
Set all bits to zero
|
boolean |
clear(long bitIndex)
Set bit to zero at specified
bitIndex |
void |
clear(long fromIndex,
long toIndex)
Set all bits to zero from
fromIndex (inclusive) to toIndex (exclusive) |
boolean |
get(long bitIndex)
Returns
true if bit set to one and false overwise. |
byte |
getByte(long offset)
Returns byte number at specified
offset |
int |
getInteger(long offset)
Returns integer number at specified
offset |
long |
getLong(long offset)
Returns long number at specified
offset |
short |
getShort(long offset)
Returns short number at specified
offset |
byte |
incrementAndGetByte(long offset,
byte increment)
Increments current byte value on defined
increment value at specified offset
and returns result. |
int |
incrementAndGetInteger(long offset,
int increment)
Increments current integer value on defined
increment value at specified offset
and returns result. |
long |
incrementAndGetLong(long offset,
long increment)
Increments current long value on defined
increment value at specified offset
and returns result. |
short |
incrementAndGetShort(long offset,
short increment)
Increments current short value on defined
increment value at specified offset
and returns result. |
long |
length()
Returns "logical size" = index of highest set bit plus one.
|
void |
not()
Executes NOT operation over all bits
|
void |
or(String... bitSetNames)
Executes OR operation over this object and specified bitsets.
|
void |
set(BitSet bs)
Copy bits state of source BitSet object to this object
|
boolean |
set(long bitIndex)
Set bit to one at specified bitIndex
|
boolean |
set(long bitIndex,
boolean value)
Set bit to
value at specified bitIndex |
void |
set(long fromIndex,
long toIndex)
Set all bits to one from
fromIndex (inclusive) to toIndex (exclusive) |
void |
set(long fromIndex,
long toIndex,
boolean value)
Set all bits to
value from fromIndex (inclusive) to toIndex (exclusive) |
byte |
setByte(long offset,
byte value)
Returns previous value of byte number and replaces it
with defined
value at specified offset |
int |
setInteger(long offset,
int value)
Returns previous value of integer number and replaces it
with defined
value at specified offset |
long |
setLong(long offset,
long value)
Returns previous value of long number and replaces it
with defined
value at specified offset |
short |
setShort(long offset,
short value)
Returns previous value of short number and replaces it
with defined
value at specified offset |
long |
size()
Returns number of set bits.
|
byte[] |
toByteArray() |
void |
xor(String... bitSetNames)
Executes XOR operation over this object and specified bitsets.
|
clearExpire, expire, expireAt, expireAt, remainTimeToLiveaddListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkandAsync, cardinalityAsync, clearAsync, clearAsync, clearAsync, getAsync, getByteAsync, getIntegerAsync, getLongAsync, getShortAsync, incrementAndGetByteAsync, incrementAndGetIntegerAsync, incrementAndGetLongAsync, incrementAndGetShortAsync, lengthAsync, notAsync, orAsync, setAsync, setAsync, setAsync, setAsync, setAsync, setByteAsync, setIntegerAsync, setLongAsync, setShortAsync, sizeAsync, toByteArrayAsync, xorAsyncclearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsyncaddListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncbyte getByte(long offset)
offsetoffset - - offset of numberbyte setByte(long offset,
byte value)
value at specified offsetoffset - - offset of numbervalue - - value of numberbyte incrementAndGetByte(long offset,
byte increment)
increment value at specified offset
and returns result.offset - - offset of numberincrement - - increment valueshort getShort(long offset)
offsetoffset - - offset of numbershort setShort(long offset,
short value)
value at specified offsetoffset - - offset of numbervalue - - value of numbershort incrementAndGetShort(long offset,
short increment)
increment value at specified offset
and returns result.offset - - offset of numberincrement - - increment valueint getInteger(long offset)
offsetoffset - - offset of numberint setInteger(long offset,
int value)
value at specified offsetoffset - - offset of numbervalue - - value of numberint incrementAndGetInteger(long offset,
int increment)
increment value at specified offset
and returns result.offset - - offset of numberincrement - - increment valuelong getLong(long offset)
offsetoffset - - offset of numberlong setLong(long offset,
long value)
value at specified offsetoffset - - offset of numbervalue - - value of numberlong incrementAndGetLong(long offset,
long increment)
increment value at specified offset
and returns result.offset - - offset of numberincrement - - increment valuelong length()
void set(long fromIndex,
long toIndex,
boolean value)
value from fromIndex (inclusive) to toIndex (exclusive)fromIndex - inclusivetoIndex - exclusivevalue - true = 1, false = 0void clear(long fromIndex,
long toIndex)
fromIndex (inclusive) to toIndex (exclusive)fromIndex - inclusivetoIndex - exclusivevoid set(BitSet bs)
bs - - BitSet sourcevoid not()
void set(long fromIndex,
long toIndex)
fromIndex (inclusive) to toIndex (exclusive)fromIndex - inclusivetoIndex - exclusivelong size()
boolean get(long bitIndex)
true if bit set to one and false overwise.bitIndex - - index of bittrue if bit set to one and false overwise.boolean set(long bitIndex)
bitIndex - - index of bittrue - if previous value was true,
false - if previous value was falseboolean set(long bitIndex,
boolean value)
value at specified bitIndexbitIndex - - index of bitvalue - true = 1, false = 0true - if previous value was true,
false - if previous value was falsebyte[] toByteArray()
long cardinality()
boolean clear(long bitIndex)
bitIndexbitIndex - - index of bittrue - if previous value was true,
false - if previous value was falsevoid clear()
BitSet asBitSet()
void or(String... bitSetNames)
bitSetNames - - name of stored bitsetsvoid and(String... bitSetNames)
bitSetNames - - name of stored bitsetsvoid xor(String... bitSetNames)
bitSetNames - - name of stored bitsetsCopyright © 2014–2020 Redisson. All rights reserved.