@Test void testEquals() { ChunkOffset chunkOffset1 = new ChunkOffset(new int[]{1, 2, 3}); ChunkOffset chunkOffset2 = new ChunkOffset(new int[]{1, 2, 3}); ChunkOffset chunkOffset3 = new ChunkOffset(new int[]{1, 2, 6}); assertThat(chunkOffset1, equalTo(chunkOffset1)); assertThat(chunkOffset1, equalTo(chunkOffset2)); assertThat(chunkOffset1, not(equalTo(chunkOffset3))); assertThat(chunkOffset1, not(equalTo(null))); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ChunkOffset that = (ChunkOffset) o; return Arrays.equals(offset, that.offset); }
ChunkOffset { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ChunkOffset that = (ChunkOffset) o; return Arrays.equals(offset, that.offset); } }
ChunkOffset { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ChunkOffset that = (ChunkOffset) o; return Arrays.equals(offset, that.offset); } ChunkOffset(int[] chunkOffset); }
ChunkOffset { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ChunkOffset that = (ChunkOffset) o; return Arrays.equals(offset, that.offset); } ChunkOffset(int[] chunkOffset); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
ChunkOffset { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ChunkOffset that = (ChunkOffset) o; return Arrays.equals(offset, that.offset); } ChunkOffset(int[] chunkOffset); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }