本文整理了Java中org.joda.time.LocalDate.equals()
方法的一些代码示例,展示了LocalDate.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDate.equals()
方法的具体详情如下:
包路径:org.joda.time.LocalDate
类名称:LocalDate
方法名:equals
[英]Compares this ReadablePartial with another returning true if the chronology, field types and values are equal.
[中]如果时间顺序、字段类型和值相等,则将此ReadablePartial与另一个返回true的部分进行比较。
代码示例来源:origin: killbill/killbill
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final RolledUpUsageModelDao that = (RolledUpUsageModelDao) o;
if (amount != null ? !amount.equals(that.amount) : that.amount != null) {
return false;
}
if (recordDate != null ? !recordDate.equals(that.recordDate) : that.recordDate != null) {
return false;
}
if (id != null ? !id.equals(that.id) : that.id != null) {
return false;
}
if (unitType != null ? !unitType.equals(that.unitType) : that.unitType != null) {
return false;
}
if (subscriptionId != null ? !subscriptionId.equals(that.subscriptionId) : that.subscriptionId != null) {
return false;
}
if (trackingId != null ? !trackingId.equals(that.trackingId) : that.trackingId != null) {
return false;
}
return true;
}
代码示例来源:origin: joda-time/joda-time
while (check.equals(this) == false) {
date.setTime(date.getTime() + 3600000);
check = LocalDate.fromDateFields(date);
} else if (check.equals(this)) {
代码示例来源:origin: JodaOrg/joda-time
while (check.equals(this) == false) {
date.setTime(date.getTime() + 3600000);
check = LocalDate.fromDateFields(date);
} else if (check.equals(this)) {
代码示例来源:origin: camunda/camunda-bpm-platform
while (check.equals(this) == false) {
date.setTime(date.getTime() + 3600000);
check = LocalDate.fromDateFields(date);
} else if (check.equals(this)) {
代码示例来源:origin: com.cedarsoft.utils.history/core
@Override
public boolean equals( Object o ) {
if ( this == o ) return true;
if ( !( o instanceof AbstractTimeEntry ) ) return false;
AbstractTimeEntry that = ( AbstractTimeEntry ) o;
if ( !begin.equals( that.begin ) ) return false;
if ( end != null ? !end.equals( that.end ) : that.end != null ) return false;
return true;
}
代码示例来源:origin: yannecer/NCalendar
@Override
public boolean equals(Object obj) {
if (obj instanceof NDate) {
NDate date = (NDate) obj;
return localDate.equals(date.localDate);
} else {
return false;
}
}
}
代码示例来源: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;
}
LocalDate dtx = (LocalDate) x;
LocalDate dty = (LocalDate) 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;
}
LocalDate dtx = (LocalDate) x;
LocalDate dty = (LocalDate) y;
return dtx.equals(dty);
}
代码示例来源:origin: yannecer/NCalendar
/**
* 是否是今天
*
* @param date
* @return
*/
public static boolean isToday(LocalDate date) {
return new LocalDate().equals(date);
}
代码示例来源:origin: com.phloc/phloc-masterdata
@Override
public boolean equals (final Object o)
{
if (o == this)
return true;
if (!(o instanceof ExchangeRatio))
return false;
final ExchangeRatio rhs = (ExchangeRatio) o;
return m_aDate.equals (rhs.m_aDate) && EqualsUtils.equals (m_aRatio, rhs.m_aRatio);
}
代码示例来源:origin: net.rapture/Reflex
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
ReflexDateValue that = null;
if ((obj != null) && (obj instanceof ReflexValue)) {
that = ((ReflexValue) obj).asDate();
return this.date.equals(that.date);
}
return false;
}
}
代码示例来源:origin: net.rapture/Reflex
public Boolean greaterThanEquals(ReflexDateValue asDate) {
if (date.equals(asDate.date)) {
return true;
}
return greaterThan(asDate);
}
代码示例来源:origin: org.kuali.kpme/kpme-tk-lm-impl
boolean validateNoUnusedTimeAllowed(LocalDate scheduledTimeOffDate, LocalDate accruedDate, String unusedTime) {
boolean valid = true;
if(scheduledTimeOffDate != null) {
if (scheduledTimeOffDate.equals(accruedDate) == false) {
this.putFieldError("unusedTime", "error.nounusedtimeallowed.selected", "Unused Time");
valid = false;
}
}
return valid;
}
代码示例来源:origin: FenixEdu/fenixedu-academic
public Money calculateRemainingAmountFor(final Installment installment, final Event event, final DateTime when,
final BigDecimal discountPercentage) {
DebtInterestCalculator debtInterestCalculator = event.getDebtInterestCalculator(when);
BigDecimal installmentOpenAmount = debtInterestCalculator.getDebtsOrderedByDueDate().stream()
.filter(d -> d.getDueDate().equals(installment.getEndDate(event))).findAny().map(d -> d.getOpenAmount())
.orElse(BigDecimal.ZERO);
return new Money(installmentOpenAmount);
}
代码示例来源:origin: yannecer/NCalendar
private void callBack(boolean isDraw, boolean isClick) {
if (!mSelectDate.equals(callBackDate)) {
//选中回调 ,绘制了才会回到
if (isDraw) {
onSelcetDate(Util.getNDate(mSelectDate), isClick);
callBackDate = mSelectDate;
}
//年月回调
onYearMonthChanged(mSelectDate, isClick);
}
}
代码示例来源:origin: FenixEdu/fenixedu-academic
public void refreshPaymentCodes(LocalDate start) {
final List<EventPaymentCode> paymentCodesToRefresh =
getPaymentCodeStream()
.filter(paymentCodeHasOpenEvent.or(paymentCodeIsUsed.negate()))
.filter(p -> !p.getStartDate().toLocalDate().equals(start))
.collect(Collectors.toList());
Lists.partition(paymentCodesToRefresh, CHUNK_SIZE).forEach(codes -> {
FenixFramework.atomic(() -> {
codes.forEach(code -> code.edit(start, start.plusMonths(getNumberOfMonths())));
});
});
}
代码示例来源:origin: FenixEdu/fenixedu-academic
public boolean contains(LocalDate date) {
LocalDate start = new LocalDate(date.getYear(), getMonthStart(), getDayStart());
LocalDate end = new LocalDate(date.getYear(), getMonthEnd(), getDayEnd());
if ((date.equals(start) || date.isAfter(start)) && (date.equals(end) || date.isBefore(end))) {
return true;
} else {
return false;
}
}
代码示例来源:origin: FenixEdu/fenixedu-academic
private boolean hasSomePhdProgramInformationBeanWithSameBeginDate(final PhdProgramInformationBean bean) {
for (PhdProgramInformation information : bean.getPhdProgram().getPhdProgramInformationsSet()) {
if (this == information) {
continue;
}
if (information.getBeginDate().equals(bean.getBeginDate())) {
return true;
}
}
return false;
}
代码示例来源:origin: org.motechproject/motech-pillreminder-api
@JsonIgnore
public boolean isTodaysDosageResponseCaptured() {
LocalDate today = DateUtil.today();
LocalDate yesterday = today.minusDays(1);
LocalTime localNow = DateUtil.now().toLocalTime();
if (responseLastCapturedDate == null) {
return false;
}
if (responseLastCapturedDate.equals(today)) {
return true;
}
return responseLastCapturedDate.equals(yesterday) && new Time(localNow.getHourOfDay(), localNow.getMinuteOfHour()).isBefore(dosageTime);
}
代码示例来源:origin: org.kill-bill.billing/killbill-invoice
@Override
public boolean apply(final TrackingRecordId input) {
return input.getTrackingId().equals(u.getTrackingId()) &&
input.getRecordDate().equals(u.getDate()) &&
input.getUnitType().equals(u.getUnitType());
}
}).orNull();
内容来源于网络,如有侵权,请联系作者删除!