java.util.BitSet.flip()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中java.util.BitSet.flip()方法的一些代码示例,展示了BitSet.flip()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BitSet.flip()方法的具体详情如下:
包路径:java.util.BitSet
类名称:BitSet
方法名:flip

BitSet.flip介绍

[英]Flips the bit at index index.
[中]在索引处翻转位。

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-common

@Override
public void not() {
 bits.flip(0, vectorSize);
}

代码示例来源:origin: Sable/soot

private static BitSet getAllIncompatible(int regCount) {
 BitSet incompatRegs = new BitSet(regCount);
 incompatRegs.flip(0, regCount);
 return incompatRegs;
}

代码示例来源:origin: google/guava

@GwtIncompatible // used only from other GwtIncompatible code
@Override
void setBits(BitSet table) {
 BitSet tmp = new BitSet();
 original.setBits(tmp);
 tmp.flip(Character.MIN_VALUE, Character.MAX_VALUE + 1);
 table.or(tmp);
}

代码示例来源:origin: org.codehaus.groovy/groovy

/**
 * Bitwise NEGATE a BitSet.
 *
 * @param self a BitSet
 * @return the bitwise NEGATE of the BitSet
 * @since 1.5.0
 */
public static BitSet bitwiseNegate(BitSet self) {
  BitSet result = (BitSet) self.clone();
  result.flip(0, result.size() - 1);
  return result;
}

代码示例来源:origin: apache/hive

private ImmutableBitSet convert(long value, int length) {
 BitSet bits = new BitSet();
 for (int index = length - 1; index >= 0; index--) {
  if (value % 2 != 0) {
   bits.set(index);
  }
  value = value >>> 1;
 }
 // We flip the bits because Calcite considers that '1'
 // means that the column participates in the GroupBy
 // and '0' does not, as opposed to grouping_id.
 bits.flip(0, length);
 return ImmutableBitSet.FROM_BIT_SET.apply(bits);
}

代码示例来源:origin: kilim/kilim

/**
 * Called to coalesce a successor's usage into the current BB. Important: This should be called
 * before live variable analysis begins, because we don't bother merging this.in or this.born.
 */
void absorb(Usage succ) {
  BitSet b = (BitSet) this.def.clone();
  b.flip(0, nLocals);
  b.and(succ.use);
  this.use.or(b);
  this.def.or(succ.def);
}

代码示例来源:origin: prestodb/presto

@GwtIncompatible // used only from other GwtIncompatible code
@Override
void setBits(BitSet table) {
 BitSet tmp = new BitSet();
 original.setBits(tmp);
 tmp.flip(Character.MIN_VALUE, Character.MAX_VALUE + 1);
 table.or(tmp);
}

代码示例来源:origin: google/j2objc

@GwtIncompatible // used only from other GwtIncompatible code
@Override
void setBits(BitSet table) {
 BitSet tmp = new BitSet();
 original.setBits(tmp);
 tmp.flip(Character.MIN_VALUE, Character.MAX_VALUE + 1);
 table.or(tmp);
}

代码示例来源:origin: oracle/helidon

@Override
void setBits(BitSet table) {
  BitSet tmp = new BitSet();
  original.setBits(tmp);
  tmp.flip(Character.MIN_VALUE, Character.MAX_VALUE + 1);
  table.or(tmp);
}

代码示例来源:origin: apache/drill

private ImmutableBitSet convert(int value, int length) {
 BitSet bits = new BitSet();
 for (int index = length - 1; index >= 0; index--) {
  if (value % 2 != 0) {
   bits.set(index);
  }
  value = value >>> 1;
 }
 // We flip the bits because Calcite considers that '1'
 // means that the column participates in the GroupBy
 // and '0' does not, as opposed to grouping_id.
 bits.flip(0, length);
 return ImmutableBitSet.FROM_BIT_SET.apply(bits);
}

代码示例来源:origin: wildfly/wildfly

@GwtIncompatible // used only from other GwtIncompatible code
@Override
void setBits(BitSet table) {
 BitSet tmp = new BitSet();
 original.setBits(tmp);
 tmp.flip(Character.MIN_VALUE, Character.MAX_VALUE + 1);
 table.or(tmp);
}

代码示例来源:origin: google/guava

} else {
 table.flip(Character.MIN_VALUE, Character.MAX_VALUE + 1);
 int negatedCharacters = DISTINCT_CHARS - totalCharacters;
 String suffix = ".negate()";

代码示例来源:origin: kilim/kilim

for (Handler handle : handUsage)
  def1.and(handle.catchBB.usage.def);
def1.flip(0, nLocals);
out.and(def1);
for (Handler handler : handUsage)

代码示例来源:origin: prestodb/presto

} else {
 table.flip(Character.MIN_VALUE, Character.MAX_VALUE + 1);
 int negatedCharacters = DISTINCT_CHARS - totalCharacters;
 String suffix = ".negate()";

代码示例来源:origin: google/j2objc

} else {
 table.flip(Character.MIN_VALUE, Character.MAX_VALUE + 1);
 int negatedCharacters = DISTINCT_CHARS - totalCharacters;
 String suffix = ".negate()";

代码示例来源:origin: Sable/soot

fullSet.flip(0, graph.size());// set all to true

代码示例来源:origin: wildfly/wildfly

} else {
 table.flip(Character.MIN_VALUE, Character.MAX_VALUE + 1);
 int negatedCharacters = DISTINCT_CHARS - totalCharacters;
 String suffix = ".negate()";

代码示例来源:origin: Sable/soot

@Override
public void complement(FlowSet<T> destFlow) {
 if (sameType(destFlow)) {
  ArrayPackedSet<T> dest = (ArrayPackedSet<T>) destFlow;
  copyBitSet(dest).flip(0, dest.map.size());
 } else {
  super.complement(destFlow);
 }
}

代码示例来源:origin: apache/accumulo

@Override
public void not() {
 bits.flip(0, vectorSize - 1);
}

代码示例来源:origin: klout/brickhouse

@Override
public void not() {
  bits.flip(0, vectorSize - 1);
}

相关文章