/// <summary> /// 返回比较之后的金额差 /// </summary> /// <param name="other">另一笔交易</param> /// <returns>金额差</returns> public double compareTo(Transcation other) => this.amount - other.amount;
public int hasCode() => code;//散列值 public bool equals(Transcation other) => true;