![JAR search and dependency download from the Maven repository](/logo.png)
com.github.steveice10.opennbt.utils.DoubleIntHashMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opennbt Show documentation
Show all versions of opennbt Show documentation
An continuation of Graham Edgecombe's jNBT library.
The newest version!
package com.github.steveice10.opennbt.utils;
import java.util.HashMap;
public class DoubleIntHashMap extends HashMap {
private static final long serialVersionUID = 1L;
public DoubleIntHashMap() {
super(100);
}
public DoubleIntHashMap(int capacity) {
super(capacity);
}
public T put(int key1, int key2, T value) {
int key = key(key1, key2);
return super.put(key, value);
}
public T get(int key1, int key2) {
int key = key(key1, key2);
return super.get(key);
}
public boolean containsKey(int key1, int key2) {
int key = key(key1, key2);
return super.containsKey(key);
}
public T remove(int key1, int key2) {
int key = key(key1, key2);
return super.remove(key);
}
private static final int key(int x, int z) {
return (x & 0xF) << 11 | (z & 0xF) << 7;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy