亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

下面Java代碼如何用Golang來寫?

下面Java代碼如何用Golang來寫?

時務者 2018-05-19 22:24:50
public?class?Todo?{ ????private?String?name; ????private?Date?until; ????private?String?details; ????public?Todo(String?name,?String?detail,?Date?until)?{ ????????this.name?=?name; ????????this.details?=?detail; ????????this.until?=?until; ????} ????public?Todo()?{ ????????this.name?=?""; ????????this.details?=?""; ????????this.until?=?new?Date(); ????} ????public?String?getName()?{ ????????return?this.name; ????} ????public?void?setName(String?name)?{ ????????this.name?=?name; ????} ????public?Date?getUntil()?{ ????????return?this.until; ????} ????public?void?setUntil(Date?until)?{ ????????this.until?=?until; ????} ????public?String?getDetails()?{ ????????return?this.details; ????} ????public?void?setDetails(String?details)?{ ????????this.details?=?details; ????} ????public?int?hashCode()?{ ????????int?prime?=?true; ????????int?result?=?1; ????????int?result?=?31?*?result?+?(this.details?==?null???0?:?this.details.hashCode()); ????????result?=?31?*?result?+?(this.name?==?null???0?:?this.name.hashCode()); ????????result?=?31?*?result?+?(this.until?==?null???0?:?this.until.hashCode()); ????????return?result; ????} ????public?boolean?equals(Object?obj)?{ ????????if?(this?==?obj)?{ ????????????return?true; ????????}?else?if?(obj?==?null)?{ ????????????return?false; ????????}?else?if?(this.getClass()?!=?obj.getClass())?{ ????????????return?false; ????????}?else?{ ????????????Todo?other?=?(Todo)obj; ????????????if?(this.details?==?null)?{ ????????????????if?(other.details?!=?null)?{ ????????????????????return?false; ????????????????} ????????????}?else?if?(!this.details.equals(other.details))?{ ????????????????return?false; ????????????} ????????????if?(this.name?==?null)?{ ????????????????if?(other.name?!=?null)?{ ????????????????????return?false; ????????????????} ????????????}?else?if?(!this.name.equals(other.name))?{ ????????????????return?false; ????????????} ????????????if?(this.until?==?null)?{ ????????????????if?(other.until?!=?null)?{ ????????????????????return?false; ????????????????} ????????????}?else?if?(!this.until.equals(other.until))?{ ????????????????return?false; ????????????} ????????????return?true; ????????} ????} }
查看完整描述

目前暫無任何回答

  • 0 回答
  • 0 關注
  • 1433 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號