热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

gnu.trove.map.TIntIntMap.containsKey()方法的使用及代码示例

本文整理了Java中gnu.trove.map.TIntIntMap.containsKey()方法的一些代码示例,展示了TIntIntMap.contai

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

TIntIntMap.containsKey介绍

[英]Checks for the present of key in the keys of the map.
[中]检查地图的键中是否存在键。

代码示例

代码示例来源:origin: alibaba/mdrill

public boolean containsKey( int key ) {
synchronized( mutex ) { return m.containsKey( key ); }
}
public boolean containsValue( int value ){

代码示例来源:origin: alibaba/mdrill

public boolean containsKey( int key ) { return m.containsKey( key ); }
public boolean containsValue( int val ) { return m.containsValue( val ); }

代码示例来源:origin: alibaba/mdrill

/**
* Checks for the present of key in the keys of the map.
*
* @param key an Object value
* @return a boolean value
*/
public boolean containsKey( Object key ) {
if ( key == null ) return _map.containsKey( _map.getNoEntryKey() );
return key instanceof Integer && _map.containsKey( unwrapKey( key ) );
}

代码示例来源:origin: CalebFenton/simplify

@Override
public void execute(ExecutionNode node, MethodState mState) {
// Pseudo points to instruction *after* switch op.
MethodLocation returnLocation = mState.getPseudoInstructionReturnInstruction();
int branchFromAddress = returnLocation.getCodeAddress() - SWITCH_OP_CODE_UNITS;
HeapItem targetItem = mState.readResultRegister();
if (targetItem.isUnknown()) {
List childList = getTargets(branchFromAddress, targetKeyToOffset);
childList.add(returnLocation);
MethodLocation[] children = childList.toArray(new MethodLocation[childList.size()]);
node.setChildLocations(children);
return;
}
int targetKey = Utils.getIntegerValue(targetItem.getValue());
if (targetKeyToOffset.containsKey(targetKey)) {
int targetOffset = branchFromAddress + targetKeyToOffset.get(targetKey);
MethodLocation child = addressToLocation.get(targetOffset);
node.setChildLocations(child);
return;
}
// Branch target is unspecified. Continue to next op.
node.setChildLocations(returnLocation);
}

代码示例来源:origin: opentripplanner/OpenTripPlanner

if (!out.containsKey(s.index) || out.get(s.index) > time)
out.put(s.index, time);
LOG.warn("Transit stop not found for transfer rule with stop label {}", tr.stop);
if (!indexForStop.containsKey(tstop.getIndex()))

代码示例来源:origin: guokr/simbase

@Override
public boolean contains(int vecid) {
return this.indexer.containsKey(vecid);
}

代码示例来源:origin: zavtech/morpheus-core

@Override
public final boolean contains(Integer key) {
return indexMap.containsKey(key);
}

代码示例来源:origin: com.conveyal/r5

@Override
public boolean containsKey(Object key) {
return map.containsKey(((Number)key).intValue());
}

代码示例来源:origin: net.sf.trove4j/trove4j

/**
* Checks for the present of key in the keys of the map.
*
* @param key an Object value
* @return a boolean value
*/
public boolean containsKey( Object key ) {
if ( key == null ) return _map.containsKey( _map.getNoEntryKey() );
return key instanceof Integer && _map.containsKey( unwrapKey( key ) );
}

代码示例来源:origin: zavtech/morpheus-core

@Override
public final boolean contains(T key) {
final int code = coding.getCode(key);
return indexMap.containsKey(code);
}

代码示例来源:origin: shilad/wikibrain

public float[] getVector(int id) {
if (sparse2Dense.containsKey(id)) {
return matrix[sparse2Dense.get(id)];
} else {
return null;
}
}

代码示例来源:origin: net.sf.trove4j/core

/**
* Checks for the present of key in the keys of the map.
*
* @param key an Object value
* @return a boolean value
*/
public boolean containsKey( Object key ) {
if ( key == null ) return _map.containsKey( _map.getNoEntryKey() );
return key instanceof Integer && _map.containsKey( unwrapKey( key ) );
}

代码示例来源:origin: shilad/wikibrain

public float similarity(int id1, int id2) {
if (sparse2Dense.containsKey(id1) && sparse2Dense.containsKey(id2)) {
return matrix[sparse2Dense.get(id1)][sparse2Dense.get(id2)];
} else {
return 0f;
}
}

代码示例来源:origin: com.palantir.patches.sourceforge/trove3

/**
* Checks for the present of key in the keys of the map.
*
* @param key an Object value
* @return a boolean value
*/
@Override
public boolean containsKey( Object key ) {
if ( key == null ) return _map.containsKey( _map.getNoEntryKey() );
return key instanceof Integer && _map.containsKey( unwrapKey( key ) );
}

代码示例来源:origin: guokr/simbase

@Override
public float[] get(int vecid) {
float[] result;
if (indexer.containsKey(vecid)) {
result = new float[this.base.size()];
get(vecid, result);
} else {
result = new float[0];
}
return result;
}

代码示例来源:origin: org.wikibrainapi/wikibrain-matrix

@Override
public InMemorySparseMatrixRow getRow(int rowId) throws IOException {
if (rowMap.containsKey(rowId)) {
return getMatrixRowInternal(rowMap.get(rowId));
} else {
return null;
}
}

代码示例来源:origin: shilad/wikibrain

@Override
public InMemorySparseMatrixRow getRow(int rowId) throws IOException {
if (rowMap.containsKey(rowId)) {
return getMatrixRowInternal(rowMap.get(rowId));
} else {
return null;
}
}

代码示例来源:origin: guokr/simbase

@Override
public void remove(int vecid) {
if (indexer.containsKey(vecid)) {
indexer.remove(vecid);
lengths.remove(vecid);
if (listening) {
for (VectorSetListener l : listeners) {
l.onVectorRemoved(this, vecid);
}
}
}
}

代码示例来源:origin: de.unijena.bioinf.phylo/mincut

public boolean add(int item) {
if (idx.containsKey(item)) {
return false;
}
idx.put(item, dta.size());
dta.add(item);
return true;
}

代码示例来源:origin: guokr/simbase

@Override
public void remove(int vecid) {
if (indexer.containsKey(vecid)) {
indexer.remove(vecid);
lengths.remove(vecid);
if (listening) {
for (VectorSetListener l : listeners) {
l.onVectorRemoved(this, vecid);
}
}
}
}

推荐阅读
author-avatar
万花_筒乙姬睦美
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有