List of usage examples for com.google.common.primitives Bytes hashCode
public static int hashCode(byte value)
From source file:com.b2international.collections.bytes.ByteKeyMapWrapper.java
@Override public int hashCode() { int h = 0;/*from w ww. j ava 2 s. c om*/ final ByteIterator i = keySet().iterator(); while (i.hasNext()) { byte key = i.next(); V value = get(key); h += Bytes.hashCode(key) ^ (value == null ? 0 : value.hashCode()); } return h; }
From source file:com.b2international.collections.bytes.ByteKeyLongMapWrapper.java
@Override public int hashCode() { int h = 0;// w w w . ja v a 2s. c o m final ByteIterator i = keySet().iterator(); while (i.hasNext()) { byte key = i.next(); long value = get(key); h += Bytes.hashCode(key) ^ Longs.hashCode(value); } return h; }
From source file:com.b2international.collections.objects.ObjectKeyByteMapWrapper.java
@Override public int hashCode() { int h = 0;/*from www . ja va2 s . c o m*/ final Iterator<K> i = keySet().iterator(); while (i.hasNext()) { K key = i.next(); byte value = get(key); h += (key == null ? 0 : key.hashCode()) ^ Bytes.hashCode(value); } return h; }
From source file:org.elasticsearch.index.fielddata.util.ByteArrayRef.java
@Override public int hashCode() { int result = 1; for (int i = start; i < end; i++) { result = 31 * result + Bytes.hashCode(values[i]); }// w w w . ja v a 2 s . c o m return result; }