org.activityinfo.model.type.time.LocalDate.equals()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(157)

本文整理了Java中org.activityinfo.model.type.time.LocalDate.equals()方法的一些代码示例,展示了LocalDate.equals()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDate.equals()方法的具体详情如下:
包路径:org.activityinfo.model.type.time.LocalDate
类名称:LocalDate
方法名:equals

LocalDate.equals介绍

暂无

代码示例

代码示例来源:origin: bedatadriven/activityinfo

@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  LocalDateInterval that = (LocalDateInterval) o;
  return this.startDate.equals(that.startDate) &&
      this.endDate.equals(that.endDate);
}

代码示例来源:origin: bedatadriven/activityinfo

LocalDate converted = converter.parse(string);
if(!converted.equals(localDate)) {
  System.out.println("[" + language +"] " + string + " => " + converted +
  " [expected: " + localDate + "]");

代码示例来源:origin: bedatadriven/activityinfo

@Test
public void minDate() {
  LocalDate afterMinDate = new LocalDate(2017,01,01);
  assertTrue("Should be _after_ minimum date", afterMinDate.after(LocalDate.MIN_DATE));
  LocalDate onMinDate = new LocalDate(1000,01,01);
  assertTrue("Should be _on_ minimum date", onMinDate.equals(LocalDate.MIN_DATE));
  LocalDate beforeMinDate = new LocalDate(99,01,01);
  assertTrue("Should be _before_ minimum date", beforeMinDate.before(LocalDate.MIN_DATE));
}

相关文章