本文整理匯總了Java中org.eclipse.collections.impl.map.mutable.primitive.IntObjectHashMap類的典型用法代碼示例。如果您正苦於以下問題:Java IntObjectHashMap類的具體用法?Java IntObjectHashMap怎麽用?Java IntObjectHashMap使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IntObjectHashMap類屬於org.eclipse.collections.impl.map.mutable.primitive包,在下文中一共展示了IntObjectHashMap類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: XTraceImpl
import org.eclipse.collections.impl.map.mutable.primitive.IntObjectHashMap; //導入依賴的package包/類
/**
* Creates a new trace.
*
* @param attributeMap
* Attribute map used to store this trace's attributes.
*/
public XTraceImpl(XAttributeMap attributeMap, int[] counter, IntObjectHashMap<XEvent> intToEvent, ObjectIntHashMap<XEvent> eventToInt) {
this.counter = counter;
this.intToEvent = intToEvent;
this.eventToInt = eventToInt;
this.attributes = attributeMap;
try {
this.compressedArray = Snappy.compress(array);
} catch (IOException e) {
e.printStackTrace();
}
}
示例2: XLogImpl
import org.eclipse.collections.impl.map.mutable.primitive.IntObjectHashMap; //導入依賴的package包/類
/**
* Creates a new log.
*
* @param attributeMap The attribute map used to store this
* log's attributes.
*/
public XLogImpl(XAttributeMap attributeMap, int[] counter, IntObjectHashMap<XEvent> intToEvent, ObjectIntHashMap<XEvent> eventToInt) {
this.counter = counter;
this.intToEvent = intToEvent;
this.eventToInt = eventToInt;
this.attributes = attributeMap;
this.extensions = new UnifiedSet<XExtension>();
this.classifiers = new ArrayList<XEventClassifier>();
this.globalTraceAttributes = new ArrayList<XAttribute>();
this.globalEventAttributes = new ArrayList<XAttribute>();
this.cachedClassifier = null;
this.cachedInfo = null;
}
示例3: test
import org.eclipse.collections.impl.map.mutable.primitive.IntObjectHashMap; //導入依賴的package包/類
@Override
public int test() {
final IntObjectHashMap<Integer> m_map = new IntObjectHashMap<>( m_keys.length );
for ( int i = 0; i < m_keys.length; ++i )
m_map.put( m_keys[ i ], null );
for ( int i = 0; i < m_keys.length; ++i )
m_map.put( m_keys[ i ], null );
return m_map.size();
}
示例4: EclipseStorage
import org.eclipse.collections.impl.map.mutable.primitive.IntObjectHashMap; //導入依賴的package包/類
public EclipseStorage(int numberOfTables){
hashtables = new ArrayList<>();
for(int i = 0 ; i < numberOfTables ; i++){
IntObjectHashMap<long[]> map = new IntObjectHashMap<>();
hashtables.add(map);
}
}
示例5: setup
import org.eclipse.collections.impl.map.mutable.primitive.IntObjectHashMap; //導入依賴的package包/類
@Override
public void setup(int[] keys, float fillFactor, int oneFailOutOf) {
super.setup(keys, fillFactor, oneFailOutOf );
m_map = new IntObjectHashMap<>( keys.length );
for ( int key : keys ) m_map.put( key % oneFailOutOf == 0 ? key + 1 : key, key );
}
示例6: BinHashTable
import org.eclipse.collections.impl.map.mutable.primitive.IntObjectHashMap; //導入依賴的package包/類
/**
* Initialize a new hash table, it needs a hash family and a number of hash
* functions that should be used.
*
* @param numberOfHashes
* The number of hash functions that should be used.
* @param family
* The hash function family knows how to create new hash
* functions, and is used therefore.
*/
public BinHashTable(int numberOfHashes,HammingHashFamily family){
hashTable = new IntObjectHashMap<long[] []>();
this.hashFunctions = new HammingHash[numberOfHashes];
for(int i=0;i<numberOfHashes;i++){
hashFunctions[i] = family.createHashFunction();
}
this.family = family;
}