BitVectorIterator implements Iterator<Boolean> { @Override public int hashCode() { return this.pointer + (0x1F * this.bitVector.hashCode()); } BitVectorIterator(BitVector bitVector); @Override boolean equals(Object o); @Override int hashCode(); @Override boolean hasNext(); @Override Boolean next(); @Override void remove();  }
@Test public void testHashCode() { Iterator<Boolean> it = (new BitVectorImpl()).iterator(); Assert.assertEquals(0, it.hashCode()); }