@Test public void hashcode1() { ListDouble coll = new ListDouble() { @Override public int size() { return 10; } @Override public double getDouble(int index) { return index; } }; ListDouble other = new ArrayDouble(new double[] {0,1,2,3,4,5,6,7,8,9}); assertThat(coll.hashCode(), equalTo(other.hashCode())); assertThat(coll.hashCode(), equalTo(Arrays.hashCode(new double[] {0,1,2,3,4,5,6,7,8,9}))); }
@Override public int hashCode() { int result = 1; for (int i = 0; i < size(); i++) { long bits = Double.doubleToLongBits(getDouble(i)); result = 31 * result + (int)(bits ^ (bits >>> 32)); } return result; }
ListDouble implements ListNumber, CollectionDouble { @Override public int hashCode() { int result = 1; for (int i = 0; i < size(); i++) { long bits = Double.doubleToLongBits(getDouble(i)); result = 31 * result + (int)(bits ^ (bits >>> 32)); } return result; } }
ListDouble implements ListNumber, CollectionDouble { @Override public int hashCode() { int result = 1; for (int i = 0; i < size(); i++) { long bits = Double.doubleToLongBits(getDouble(i)); result = 31 * result + (int)(bits ^ (bits >>> 32)); } return result; }  }
ListDouble implements ListNumber, CollectionDouble { @Override public int hashCode() { int result = 1; for (int i = 0; i < size(); i++) { long bits = Double.doubleToLongBits(getDouble(i)); result = 31 * result + (int)(bits ^ (bits >>> 32)); } return result; }  @Override IteratorDouble iterator(); @Override float getFloat(int index); @Override long getLong(int index); @Override int getInt(int index); @Override short getShort(int index); @Override byte getByte(int index); @Override void setDouble(int index, double value); @Override void setFloat(int index, float value); @Override void setLong(int index, long value); @Override void setInt(int index, int value); @Override void setShort(int index, short value); @Override void setByte(int index, byte value); static ListDouble concatenate( final ListNumber... lists ); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
ListDouble implements ListNumber, CollectionDouble { @Override public int hashCode() { int result = 1; for (int i = 0; i < size(); i++) { long bits = Double.doubleToLongBits(getDouble(i)); result = 31 * result + (int)(bits ^ (bits >>> 32)); } return result; }  @Override IteratorDouble iterator(); @Override float getFloat(int index); @Override long getLong(int index); @Override int getInt(int index); @Override short getShort(int index); @Override byte getByte(int index); @Override void setDouble(int index, double value); @Override void setFloat(int index, float value); @Override void setLong(int index, long value); @Override void setInt(int index, int value); @Override void setShort(int index, short value); @Override void setByte(int index, byte value); static ListDouble concatenate( final ListNumber... lists ); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }