Beispiel #1
0
 @Override
 public int hashCode() {
   int result = idStation != null ? idStation.hashCode() : 0;
   result = 31 * result + (idTrain != null ? idTrain.hashCode() : 0);
   result = 31 * result + (nextStation != null ? nextStation.hashCode() : 0);
   return result;
 }
Beispiel #2
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    ScheduleEntityPK that = (ScheduleEntityPK) o;

    if (idStation != null ? !idStation.equals(that.idStation) : that.idStation != null)
      return false;
    if (idTrain != null ? !idTrain.equals(that.idTrain) : that.idTrain != null) return false;
    return nextStation != null ? nextStation.equals(that.nextStation) : that.nextStation == null;
  }