List of usage examples for com.google.common.primitives Floats hashCode
public static int hashCode(float value)
From source file:net.myrrix.common.SimpleRecommendedItem.java
@Override public int hashCode() { return Longs.hashCode(itemID) ^ Floats.hashCode(value); }
From source file:net.conquiris.qs.FloatToken.java
@Override public int hashCode() { return Floats.hashCode(value); }
From source file:net.myrrix.client.translating.GenericTranslatedRecommendedItem.java
@Override public int hashCode() { return itemID.hashCode() ^ Floats.hashCode(value); }
From source file:net.bither.xrandom.UEntropySensor.java
@Override public void onSensorChanged(SensorEvent event) { if (event != null && event.values != null) { byte[] data = new byte[event.values.length * Ints.BYTES]; byte[] everyData; for (int i = 0; i < event.values.length; i++) { int hash = Floats.hashCode(event.values[i]); everyData = Ints.toByteArray(hash); for (int j = 0; j < Ints.BYTES; j++) { if (everyData.length > j) { data[i * Ints.BYTES + j] = everyData[j]; } else { data[i * Ints.BYTES + j] = 0; }/*from w w w . jav a 2 s . c o m*/ } } collector.onNewData(data, UEntropyCollector.UEntropySource.Sensor); visualizer.onSensorData(event.sensor); } }
From source file:org.elasticsearch.index.fielddata.util.FloatArrayRef.java
@Override public int hashCode() { int result = 1; for (int i = start; i < end; i++) { result = 31 * result + Floats.hashCode(values[i]); }//from w ww.ja v a 2 s .c om return result; }