RBitSetAsync
, RExpirable
, RExpirableAsync
, RObject
, RObjectAsync
RedissonBitSet
public interface RBitSet extends RExpirable, RBitSetAsync
Modifier and Type | Method | 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. |
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.
|
boolean |
set(long bitIndex) |
Set bit to one at specified bitIndex
|
void |
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) |
void |
set(BitSet bs) |
Copy bits state of source BitSet object to this object
|
long |
size() |
Returns number of set bits.
|
byte[] |
toByteArray() |
|
void |
xor(String... bitSetNames) |
Executes XOR operation over this object and specified bitsets.
|
andAsync, cardinalityAsync, clearAsync, clearAsync, clearAsync, getAsync, lengthAsync, notAsync, orAsync, setAsync, setAsync, setAsync, setAsync, setAsync, sizeAsync, toByteArrayAsync, xorAsync
clearExpire, expire, expireAt, expireAt, remainTimeToLive
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
copy, delete, dump, getCodec, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, touch, unlink
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
long 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 falsevoid set(long bitIndex, boolean value)
value
at specified bitIndex
bitIndex
- - index of bitvalue
- true = 1, false = 0byte[] toByteArray()
long cardinality()
boolean clear(long bitIndex)
bitIndex
bitIndex
- - 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–2018 The Redisson Project. All rights reserved.