Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 35 lines 757 B view raw
1/* 2 * To change this template, choose Tools | Templates 3 * and open the template in the editor. 4 */ 5 6package org.bukkit.craftbukkit.util; 7 8/** 9 * @author Nathan 10 */ 11public abstract class LongHash { 12 static long toLong(int msw, int lsw) { 13 return ((long) msw << 32) + lsw - Integer.MIN_VALUE; 14 } 15 16 static int msw(long l) { 17 return (int) (l >> 32); 18 } 19 20 static int lsw(long l) { 21 return (int) (l & 0xFFFFFFFF) + Integer.MIN_VALUE; 22 } 23 24 public boolean containsKey(int msw, int lsw) { 25 return containsKey(toLong(msw, lsw)); 26 } 27 28 public void remove(int msw, int lsw) { 29 remove(toLong(msw, lsw)); 30 } 31 32 public abstract boolean containsKey(long key); 33 34 public abstract void remove(long key); 35}