/** * Get a singleton instance of hash function of a given type. * @param type predefined hash type * @return hash function instance, or null if type is invalid */ public static Hash getInstance(int type) { switch(type) { case JENKINS_HASH: return JenkinsHash.getInstance(); case MURMUR_HASH: return MurmurHash.getInstance(); default: return null; } }
Hash murmur = MurmurHash.getInstance(); for (int i = 0; i < numcat; ++i) { ByteBuffer buf = ByteBuffer.allocate(4);
/** * Get a singleton instance of hash function of a given type. * @param type predefined hash type * @return hash function instance, or null if type is invalid */ public static Hash getInstance(int type) { switch(type) { case JENKINS_HASH: return JenkinsHash.getInstance(); case MURMUR_HASH: return MurmurHash.getInstance(); default: return null; } }
/** * Get a singleton instance of hash function of a given type. * @param type predefined hash type * @return hash function instance, or null if type is invalid */ public static Hash getInstance(int type) { switch(type) { case JENKINS_HASH: return JenkinsHash.getInstance(); case MURMUR_HASH: return MurmurHash.getInstance(); default: return null; } }
/** * Get a singleton instance of hash function of a given type. * @param type predefined hash type * @return hash function instance, or null if type is invalid */ public static Hash getInstance(int type) { switch(type) { case JENKINS_HASH: return JenkinsHash.getInstance(); case MURMUR_HASH: return MurmurHash.getInstance(); default: return null; } }
/** * Get a singleton instance of hash function of a given type. * @param type predefined hash type * @return hash function instance, or null if type is invalid */ public static Hash getInstance(int type) { switch(type) { case JENKINS_HASH: return JenkinsHash.getInstance(); case MURMUR_HASH: return MurmurHash.getInstance(); default: return null; } }
/** * Get a singleton instance of hash function of a given type. * @param type predefined hash type * @return hash function instance, or null if type is invalid */ public static Hash getInstance(int type) { switch(type) { case JENKINS_HASH: return JenkinsHash.getInstance(); case MURMUR_HASH: return MurmurHash.getInstance(); default: return null; } }
assertTrue("testHash", MurmurHash.getInstance() == Hash.getInstance(cfg)); MurmurHash.getInstance() == Hash.getInstance(cfg)); MurmurHash.getInstance() == Hash.getInstance(Hash.MURMUR_HASH));
assertTrue("testHash", MurmurHash.getInstance() == Hash.getInstance(cfg)); MurmurHash.getInstance() == Hash.getInstance(cfg)); MurmurHash.getInstance() == Hash.getInstance(Hash.MURMUR_HASH));