@Test public void testHashCode() { final int batchSize = 1 + this.r.nextInt(20); BatchColumn bc = new BatchColumn(batchSize); int numberOfTuples; switch(this.r.nextInt(2)) { case 0: numberOfTuples = batchSize; break; default: numberOfTuples = 1 + this.r.nextInt(batchSize); } Double first = new Double(this.r.nextDouble() + this.r.nextLong()); bc.add(first); for(int i = 1; i < numberOfTuples; ++i) { bc.add(new Double(this.r.nextDouble() + this.r.nextLong())); } Assert.assertEquals(first.hashCode(), bc.hashCode()); }
@Override public int hashCode() { assert (this.size() > 0); return this.get(0).hashCode(); }
BatchColumn extends ArrayList<Object> { @Override public int hashCode() { assert (this.size() > 0); return this.get(0).hashCode(); } }
BatchColumn extends ArrayList<Object> { @Override public int hashCode() { assert (this.size() > 0); return this.get(0).hashCode(); } BatchColumn();  BatchColumn(int batchSize); }
BatchColumn extends ArrayList<Object> { @Override public int hashCode() { assert (this.size() > 0); return this.get(0).hashCode(); } BatchColumn();  BatchColumn(int batchSize); @Override int hashCode(); }
BatchColumn extends ArrayList<Object> { @Override public int hashCode() { assert (this.size() > 0); return this.get(0).hashCode(); } BatchColumn();  BatchColumn(int batchSize); @Override int hashCode();  }