本文整理了Java中java.util.BitSet.isEmpty()
方法的一些代码示例,展示了BitSet.isEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BitSet.isEmpty()
方法的具体详情如下:
包路径:java.util.BitSet
类名称:BitSet
方法名:isEmpty
[英]Returns true if all the bits in this BitSet are set to false, false otherwise.
[中]如果此位集中的所有位都设置为false,则返回true,否则返回false。
代码示例来源:origin: apache/incubator-druid
@Override
public boolean isEmpty()
{
return bitmap.isEmpty();
}
代码示例来源:origin: apache/geode
/** return false if any revisions have been recorded in the range of this exception */
@Override
public boolean isEmpty() {
return (this.received == null) || (this.received.isEmpty());
}
代码示例来源:origin: org.postgresql/postgresql
boolean hasUnresolvedTypes() {
if (preparedTypes == null) {
return true;
}
return this.unspecifiedParams != null && !this.unspecifiedParams.isEmpty();
}
代码示例来源:origin: wildfly/wildfly
private boolean checkAllProposesReceived() {
return receivedPropose.isEmpty();
}
代码示例来源:origin: apache/pulsar
public synchronized boolean ackCumulative(int batchIndex) {
// +1 since to argument is exclusive
bitSet.clear(0, batchIndex + 1);
return bitSet.isEmpty();
}
代码示例来源:origin: apache/pulsar
public synchronized boolean ackIndividual(int batchIndex) {
bitSet.clear(batchIndex);
return bitSet.isEmpty();
}
代码示例来源:origin: lettuce-io/lettuce-core
public List<Integer> getSlots() {
if (slots == null || slots.isEmpty()) {
return Collections.emptyList();
}
List<Integer> slots = new ArrayList<>();
for (int i = 0; i < SlotHash.SLOT_COUNT; i++) {
if (this.slots.get(i)) {
slots.add(i);
}
}
return slots;
}
代码示例来源:origin: apache/geode
private static boolean subset(BitSet sub, BitSet sup) {
BitSet subcopy = (BitSet) sub.clone();
subcopy.andNot(sup);
return subcopy.isEmpty();
}
代码示例来源:origin: skylot/jadx
private static boolean usedArgAssign(InsnNode insn, BitSet args) {
if (args.isEmpty()) {
return false;
}
RegisterArg result = insn.getResult();
if (result == null || result.isField()) {
return false;
}
return args.get(result.getRegNum());
}
代码示例来源:origin: JesusFreke/smali
private void propagateChanges(@Nonnull BitSet changedInstructions, int registerNumber, boolean override) {
//Using a for loop inside the while loop optimizes for the common case of the successors of an instruction
//occurring after the instruction. Any successors that occur prior to the instruction will be picked up on
//the next iteration of the while loop.
//This could also be done recursively, but in large methods it would likely cause very deep recursion.
while (!changedInstructions.isEmpty()) {
for (int instructionIndex=changedInstructions.nextSetBit(0);
instructionIndex>=0;
instructionIndex=changedInstructions.nextSetBit(instructionIndex+1)) {
changedInstructions.clear(instructionIndex);
propagateRegisterToSuccessors(analyzedInstructions.valueAt(instructionIndex), registerNumber,
changedInstructions, override);
}
}
}
代码示例来源:origin: kairosdb/kairosdb
public ServiceIndex setModificationTimeNull()
{
boolean changed = m_modificationTime.setNull();
if (changed)
{
if (m_dirtyFlags.isEmpty())
GenOrmDataSource.getGenOrmConnection().addToTransaction(this);
m_dirtyFlags.set(MODIFICATION_TIME_FIELD_META.getDirtyFlag());
}
return ((ServiceIndex)this);
}
代码示例来源:origin: kairosdb/kairosdb
public Metric setNameNull()
{
boolean changed = m_name.setNull();
if (changed)
{
if (m_dirtyFlags.isEmpty())
GenOrmDataSource.getGenOrmConnection().addToTransaction(this);
m_dirtyFlags.set(NAME_FIELD_META.getDirtyFlag());
}
return ((Metric)this);
}
代码示例来源:origin: kairosdb/kairosdb
public Metric setTypeNull()
{
boolean changed = m_type.setNull();
if (changed)
{
if (m_dirtyFlags.isEmpty())
GenOrmDataSource.getGenOrmConnection().addToTransaction(this);
m_dirtyFlags.set(TYPE_FIELD_META.getDirtyFlag());
}
return ((Metric)this);
}
代码示例来源:origin: kairosdb/kairosdb
public DataPoint setValueNull()
{
boolean changed = m_value.setNull();
if (changed)
{
if (m_dirtyFlags.isEmpty())
GenOrmDataSource.getGenOrmConnection().addToTransaction(this);
m_dirtyFlags.set(VALUE_FIELD_META.getDirtyFlag());
}
return ((DataPoint)this);
}
代码示例来源:origin: kairosdb/kairosdb
public ServiceIndex setValueNull()
{
boolean changed = m_value.setNull();
if (changed)
{
if (m_dirtyFlags.isEmpty())
GenOrmDataSource.getGenOrmConnection().addToTransaction(this);
m_dirtyFlags.set(VALUE_FIELD_META.getDirtyFlag());
}
return ((ServiceIndex)this);
}
代码示例来源:origin: kairosdb/kairosdb
public ServiceModification setModificationTimeNull()
{
boolean changed = m_modificationTime.setNull();
if (changed)
{
if (m_dirtyFlags.isEmpty())
GenOrmDataSource.getGenOrmConnection().addToTransaction(this);
m_dirtyFlags.set(MODIFICATION_TIME_FIELD_META.getDirtyFlag());
}
return ((ServiceModification)this);
}
代码示例来源:origin: org.apache.lucene/lucene-core
/** Returns true if there are dead states that reach an accept state. */
public static boolean hasDeadStatesToAccept(Automaton a) {
BitSet reachableFromInitial = getLiveStatesFromInitial(a);
BitSet reachableFromAccept = getLiveStatesToAccept(a);
reachableFromAccept.andNot(reachableFromInitial);
return reachableFromAccept.isEmpty() == false;
}
代码示例来源:origin: kairosdb/kairosdb
public DataPoint setMetricRef(Metric table)
{
//We add the record to the transaction if one of the key values change
if (m_metricId.setValue(table.getId()))
{
if ((m_dirtyFlags.isEmpty()) && (GenOrmDataSource.getGenOrmConnection() != null))
GenOrmDataSource.getGenOrmConnection().addToTransaction(this);
m_dirtyFlags.set(METRIC_ID_FIELD_META.getDirtyFlag());
}
return ((DataPoint)this);
}
代码示例来源:origin: kairosdb/kairosdb
public MetricTag setMetricRef(Metric table)
{
//We add the record to the transaction if one of the key values change
if (m_metricId.setValue(table.getId()))
{
if ((m_dirtyFlags.isEmpty()) && (GenOrmDataSource.getGenOrmConnection() != null))
GenOrmDataSource.getGenOrmConnection().addToTransaction(this);
m_dirtyFlags.set(METRIC_ID_FIELD_META.getDirtyFlag());
}
return ((MetricTag)this);
}
代码示例来源:origin: google/guava
assertTrue(ArbitraryInstances.get(Queue.class).isEmpty());
assertTrue(ArbitraryInstances.get(PriorityQueue.class).isEmpty());
assertTrue(ArbitraryInstances.get(BitSet.class).isEmpty());
assertTrue(ArbitraryInstances.get(TreeSet.class).isEmpty());
assertTrue(ArbitraryInstances.get(TreeMap.class).isEmpty());
内容来源于网络,如有侵权,请联系作者删除!