public interface RBitSet extends RExpirable, RBitSetAsync
Modifier and Type | Method and Description |
---|---|
void |
and(String... bitSetNames) |
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() |
void |
or(String... bitSetNames) |
void |
set(BitSet bs) |
void |
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) |
long |
size()
Returns number of set bits.
|
byte[] |
toByteArray() |
void |
xor(String... bitSetNames) |
clearExpire, expire, expireAt, expireAt, remainTimeToLive
delete, getCodec, getName, isExists, migrate, move, rename, renamenx, touch, unlink
andAsync, cardinalityAsync, clearAsync, clearAsync, clearAsync, getAsync, lengthAsync, notAsync, orAsync, setAsync, setAsync, setAsync, setAsync, setAsync, sizeAsync, toByteArrayAsync, xorAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, 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)
void 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.void set(long bitIndex)
bitIndex
- - index of bitvoid 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)
void and(String... bitSetNames)
void xor(String... bitSetNames)
Copyright © 2014–2018 The Redisson Project. All rights reserved.