コード例 #1
0
ファイル: ScheduleEntityPK.java プロジェクト: oxaoo/srt
 @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;
 }
コード例 #2
0
ファイル: ScheduleEntityPK.java プロジェクト: oxaoo/srt
  @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;
  }