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


Java Long2ObjectMap.get方法代码示例

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


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

示例1: convertIdentifiers

import it.unimi.dsi.fastutil.longs.Long2ObjectMap; //导入方法依赖的package包/类
@Override
public void convertIdentifiers(final Long2ObjectMap<ValueSpecification> identifiers) {
  if (_inputSpecifications == null) {
    if (_inputIdentifiers.length > 0) {
      _inputSpecifications = new ValueSpecification[_inputIdentifiers.length];
      for (int i = 0; i < _inputIdentifiers.length; i++) {
        _inputSpecifications[i] = identifiers.get(_inputIdentifiers[i]);
      }
    } else {
      _inputSpecifications = EMPTY_VALUESPEC;
    }
  }
  if (_outputSpecifications == null) {
    if (_outputIdentifiers.length > 0) {
      _outputSpecifications = new ValueSpecification[_outputIdentifiers.length];
      for (int i = 0; i < _outputIdentifiers.length; i++) {
        _outputSpecifications[i] = identifiers.get(_outputIdentifiers[i]);
      }
    } else {
      _outputSpecifications = EMPTY_VALUESPEC;
    }
  }
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:24,代码来源:CalculationJobItem.java

示例2: canonicalizeAndAddConst

import it.unimi.dsi.fastutil.longs.Long2ObjectMap; //导入方法依赖的package包/类
private void canonicalizeAndAddConst(
    ConstType type, int dest, long value, Long2ObjectMap<ConstNumber> table) {
  ConstNumber existing = table.get(value);
  if (existing != null) {
    currentBlock.writeCurrentDefinition(dest, existing.outValue(), ThrowingInfo.NO_THROW);
  } else {
    Value out = writeRegister(dest, MoveType.fromConstType(type), ThrowingInfo.NO_THROW);
    ConstNumber instruction = new ConstNumber(type, out, value);
    BasicBlock entryBlock = blocks.get(0);
    if (currentBlock != entryBlock) {
      // Insert the constant instruction at the start of the block right after the argument
      // instructions. It is important that the const instruction is put before any instruction
      // that can throw exceptions (since the value could be used on the exceptional edge).
      InstructionListIterator it = entryBlock.listIterator();
      while (it.hasNext()) {
        if (!it.next().isArgument()) {
          it.previous();
          break;
        }
      }
      it.add(instruction);
    } else {
      add(instruction);
    }
    table.put(value, instruction);
  }
}
 
开发者ID:inferjay,项目名称:r8,代码行数:28,代码来源:IRBuilder.java


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