@Test public void testHashCode() { final Move mvt1 = new Move(BLACK_PAWN, Square.valueOf("a2"), Square.valueOf("a4")); final Move mvt2 = new Move(BLACK_PAWN, Square.valueOf(8), Square.valueOf(24)); final Move mvt3 = new Move(BLACK_PAWN, Square.valueOf(16), Square.valueOf(24)); assertTrue(mvt1.hashCode() == mvt2.hashCode()); assertTrue(mvt1.hashCode() != mvt3.hashCode()); assertTrue(mvt2.hashCode() != mvt3.hashCode()); }
@Override public int hashCode() { return toId(); }
Move implements Serializable { @Override public int hashCode() { return toId(); } }
Move implements Serializable { @Override public int hashCode() { return toId(); } Move(final Piece pPiece, final Square pOrigine, final Square pDestination);  Move(final Piece pPiece, final Square pOrigine, final Square pDestination,
      final Piece pPrise); }
Move implements Serializable { @Override public int hashCode() { return toId(); } Move(final Piece pPiece, final Square pOrigine, final Square pDestination);  Move(final Piece pPiece, final Square pOrigine, final Square pDestination,
      final Piece pPrise); @Override boolean equals(final Object pObjet); Piece getCaptured(); Square getFrom(); Piece getPiece(); Square getTo(); @Override int hashCode(); int toId(); @Override String toString(); static Move valueOf(final int pId); }
Move implements Serializable { @Override public int hashCode() { return toId(); } Move(final Piece pPiece, final Square pOrigine, final Square pDestination);  Move(final Piece pPiece, final Square pOrigine, final Square pDestination,
      final Piece pPrise); @Override boolean equals(final Object pObjet); Piece getCaptured(); Square getFrom(); Piece getPiece(); Square getTo(); @Override int hashCode(); int toId(); @Override String toString(); static Move valueOf(final int pId);  }