当前位置: 首页>>代码示例>>Java>>正文


Java BitSet.set方法代码示例

本文整理汇总了Java中java.util.BitSet.set方法的典型用法代码示例。如果您正苦于以下问题:Java BitSet.set方法的具体用法?Java BitSet.set怎么用?Java BitSet.set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.BitSet的用法示例。


在下文中一共展示了BitSet.set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: write

import java.util.BitSet; //导入方法依赖的package包/类
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Log_args struct)
        throws TException
{
    TTupleProtocol oprot = (TTupleProtocol) prot;
    BitSet optionals = new BitSet();
    if (struct.isSetMessages()) {
        optionals.set(0);
    }
    oprot.writeBitSet(optionals, 1);
    if (struct.isSetMessages()) {
        {
            oprot.writeI32(struct.messages.size());
            for (LogEntry _iter4 : struct.messages) {
                _iter4.write(oprot);
            }
        }
    }
}
 
开发者ID:airlift,项目名称:drift,代码行数:20,代码来源:scribe.java

示例2: write

import java.util.BitSet; //导入方法依赖的package包/类
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, MetricTag struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetTagName()) {
    optionals.set(0);
  }
  if (struct.isSetTagValue()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetTagName()) {
    oprot.writeString(struct.tagName);
  }
  if (struct.isSetTagValue()) {
    oprot.writeString(struct.tagValue);
  }
}
 
开发者ID:uber-java,项目名称:tally,代码行数:19,代码来源:MetricTag.java

示例3: write

import java.util.BitSet; //导入方法依赖的package包/类
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TResult struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  {
    oprot.writeI32(struct.columnValues.size());
    for (TColumnValue _iter4 : struct.columnValues)
    {
      _iter4.write(oprot);
    }
  }
  BitSet optionals = new BitSet();
  if (struct.isSetRow()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetRow()) {
    oprot.writeBinary(struct.row);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:20,代码来源:TResult.java

示例4: write

import java.util.BitSet; //导入方法依赖的package包/类
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SyncOfferMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  struct.store.write(oprot);
  BitSet optionals = new BitSet();
  if (struct.isSetVersions()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetVersions()) {
    {
      oprot.writeI32(struct.versions.size());
      for (KeyedVersions _iter44 : struct.versions)
      {
        _iter44.write(oprot);
      }
    }
  }
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:21,代码来源:SyncOfferMessage.java

示例5: write

import java.util.BitSet; //导入方法依赖的package包/类
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  if (struct.isSetIo()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetSuccess()) {
    oprot.writeBool(struct.success);
  }
  if (struct.isSetIo()) {
    struct.io.write(oprot);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:19,代码来源:Hbase.java

示例6: testSeatBitMap

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * testSeatBitMap
 */
@Test
public void testSeatBitMap() throws Exception {
    BitSet seats = client.getSeatsBitSet(flight_id);
    assertNotNull(seats);
    assertFalse(client.isFlightFull(seats));
    
    for (int i = 0; i < SEATSConstants.FLIGHTS_NUM_SEATS; i++) {
        assertFalse("SEAT #" + i, seats.get(i));
        seats.set(i);
        assertTrue("SEAT #" + i, seats.get(i));
        if (i+1 < SEATSConstants.FLIGHTS_NUM_SEATS)
            assertFalse(client.isFlightFull(seats));
    } // FOR
    
    assertTrue(client.isFlightFull(seats));
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:20,代码来源:TestSEATSClient.java

示例7: write

import java.util.BitSet; //导入方法依赖的package包/类
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  if (struct.isSetIo()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetSuccess()) {
    struct.success.write(oprot);
  }
  if (struct.isSetIo()) {
    struct.io.write(oprot);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:19,代码来源:THBaseService.java

示例8: write

import java.util.BitSet; //导入方法依赖的package包/类
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sayHello_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetSuccess()) {
    oprot.writeString(struct.success);
  }
}
 
开发者ID:xiongbeer,项目名称:Cobweb,代码行数:13,代码来源:HelloWorldService.java

示例9: testToString

import java.util.BitSet; //导入方法依赖的package包/类
@Test
public void testToString() {
  BitSet activeCategories = new BitSet(10);
  activeCategories.set(2);
  activeCategories.set(5);
  CategoricalDecision decision = new CategoricalDecision(0, activeCategories, true);
  assertEquals("(#0 ∈ [2,5])", decision.toString());
}
 
开发者ID:oncewang,项目名称:oryx2,代码行数:9,代码来源:CategoricalDecisionTest.java

示例10: write

import java.util.BitSet; //导入方法依赖的package包/类
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getPackets_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSessionid()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetSessionid()) {
    oprot.writeString(struct.sessionid);
  }
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:13,代码来源:PacketStreamer.java

示例11: computeTrue

import java.util.BitSet; //导入方法依赖的package包/类
/** Returns the (bit) set of all states. */
private BitSet computeTrue() {
    BitSet result = new BitSet(this.nodeCount);
    for (int i = 0; i < this.nodeCount; i++) {
        result.set(i);
    }
    return result;
}
 
开发者ID:meteoorkip,项目名称:JavaGraph,代码行数:9,代码来源:CTLMarker.java

示例12: compatibleRegs

import java.util.BitSet; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public BitSet compatibleRegs(DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    BitSet bits = new BitSet(1);

    bits.set(0, unsignedFitsInByte(regs.get(0).getReg()));
    return bits;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:10,代码来源:Form11x.java

示例13: write

import java.util.BitSet; //导入方法依赖的package包/类
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TIllegalArgument struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetMessage()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetMessage()) {
    oprot.writeString(struct.message);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:13,代码来源:TIllegalArgument.java

示例14: regenerateCheckedBitSet

import java.util.BitSet; //导入方法依赖的package包/类
private void regenerateCheckedBitSet () {
    checked = new BitSet (size);
    for (int i = 0; i < size; i++) {
        if (external[i] >= 0) {
            checked.set (i);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:FilteredListModel.java

示例15: getTopicMask

import java.util.BitSet; //导入方法依赖的package包/类
private BitSet getTopicMask(Topic topic) {
    BitSet topicMask = new BitSet(BLOOM_BYTES * 8);
    for (int i = 0; i < BITS_PER_BLOOM; i++) {
        int x = topic.getBytes()[i] & 0xFF;
        if ((topic.getBytes()[BITS_PER_BLOOM] & (1 << i)) != 0) {
            x += 256;
        }
        topicMask.set(x);
    }
    return topicMask;
}
 
开发者ID:talentchain,项目名称:talchain,代码行数:12,代码来源:BloomFilter.java


注:本文中的java.util.BitSet.set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。