org.joda.time.LocalTime.equals()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(206)

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

LocalTime.equals介绍

[英]Compares this ReadablePartial with another returning true if the chronology, field types and values are equal.
[中]如果时间顺序、字段类型和值相等,则将此ReadablePartial与另一个返回true的部分进行比较。

代码示例

代码示例来源:origin: joda-time/joda-time-hibernate

public boolean equals(Object x, Object y) throws HibernateException {
  if (x == y) {
    return true;
  }
  if (x == null || y == null) {
    return false;
  }
  LocalTime dtx = (LocalTime) x;
  LocalTime dty = (LocalTime) y;
  return dtx.equals(dty);
}

代码示例来源:origin: joda-time/joda-time-hibernate

public boolean equals(Object x, Object y) throws HibernateException {
  if (x == y) {
    return true;
  }
  if (x == null || y == null) {
    return false;
  }
  LocalTime dtx = (LocalTime) x;
  LocalTime dty = (LocalTime) y;
  return dtx.equals(dty);
}

代码示例来源:origin: joda-time/joda-time-hibernate

public boolean equals(Object x, Object y) throws HibernateException {
  if (x == y) {
    return true;
  }
  if (x == null || y == null) {
    return false;
  }
  LocalTime dtx = (LocalTime) x;
  LocalTime dty = (LocalTime) y;
  return dtx.equals(dty);
}

代码示例来源:origin: JodaOrg/joda-time-hibernate

public boolean equals(Object x, Object y) throws HibernateException {
  if (x == y) {
    return true;
  }
  if (x == null || y == null) {
    return false;
  }
  LocalTime dtx = (LocalTime) x;
  LocalTime dty = (LocalTime) y;
  return dtx.equals(dty);
}

代码示例来源:origin: joda-time/joda-time-hibernate

public boolean equals(Object x, Object y) throws HibernateException {
  if (x == y) {
    return true;
  }
  if (x == null || y == null) {
    return false;
  }
  LocalTime dtx = (LocalTime) x;
  LocalTime dty = (LocalTime) y;
  return dtx.equals(dty);
}

代码示例来源:origin: JodaOrg/joda-time-hibernate

public boolean equals(Object x, Object y) throws HibernateException {
  if (x == y) {
    return true;
  }
  if (x == null || y == null) {
    return false;
  }
  LocalTime dtx = (LocalTime) x;
  LocalTime dty = (LocalTime) y;
  return dtx.equals(dty);
}

代码示例来源:origin: JodaOrg/joda-time-hibernate

public boolean equals(Object x, Object y) throws HibernateException {
  if (x == y) {
    return true;
  }
  if (x == null || y == null) {
    return false;
  }
  LocalTime dtx = (LocalTime) x;
  LocalTime dty = (LocalTime) y;
  return dtx.equals(dty);
}

代码示例来源:origin: JodaOrg/joda-time-hibernate

public boolean equals(Object x, Object y) throws HibernateException {
  if (x == y) {
    return true;
  }
  if (x == null || y == null) {
    return false;
  }
  LocalTime dtx = (LocalTime) x;
  LocalTime dty = (LocalTime) y;
  return dtx.equals(dty);
}

代码示例来源:origin: dk.eobjects.datacleaner/DataCleaner-core

@Override
protected void processValue(Column column, Object value, long valueCount,
    Row row) {
  SortedMap<DateTime, Long> sortedMap = _sortedMaps.get(column);
  if (sortedMap == null) {
    sortedMap = new TreeMap<DateTime, Long>();
    _sortedMaps.put(column, sortedMap);
  }
  DateTime dateTime = new DateTime(value);
  Boolean isDateOnly = _isDateOnly.get(column);
  if (isDateOnly == null) {
    isDateOnly = Boolean.TRUE;
    _isDateOnly.put(column, isDateOnly);
  }
  if (isDateOnly == Boolean.TRUE) {
    if (!LocalTime.MIDNIGHT.equals(dateTime.toLocalTime())) {
      isDateOnly = Boolean.FALSE;
      _isDateOnly.put(column, isDateOnly);
    }
  }
  _years.add(dateTime.getYear());
  Long dateTimeCount = sortedMap.get(dateTime);
  if (dateTimeCount == null) {
    dateTimeCount = 0l;
  }
  dateTimeCount += valueCount;
  sortedMap.put(dateTime, dateTimeCount);
}

代码示例来源:origin: Jasig/uPortal

@Override
public boolean equals(Object obj) {
  if (this == obj) return true;
  if (obj == null) return false;
  if (!(obj instanceof TimeDimension)) return false;
  TimeDimension other = (TimeDimension) obj;
  if (time == null) {
    if (other.getTime() != null) return false;
  } else if (!time.equals(other.getTime())) return false;
  return true;
}

代码示例来源:origin: Jasig/uPortal

while (nextTime.isBefore(lastTime) || nextTime.equals(lastTime)) {
  checkShutdown();
  this.timeDimensionDao.createTimeDimension(nextTime);
  if (nextTime.equals(lastTime)) {
    break;

代码示例来源:origin: org.kuali.kpme/kpme-tk-lm-impl

int days = end_dt_timezone.withZone(userTimeZone).toLocalTime().equals(new LocalTime(0,0,0)) ? Days.daysBetween(startDay, new LocalDate(end_dt_timezone)).getDays() : Days.daysBetween(startDay, new LocalDate(end_dt_timezone)).getDays()+1;
for (int i=0; i < days; i++) {
  LocalDate d = startDay.withFieldAdded(DurationFieldType.days(), i);

相关文章