本文整理了Java中net.fortuna.ical4j.model.Date.equals()
方法的一些代码示例,展示了Date.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Date.equals()
方法的具体详情如下:
包路径:net.fortuna.ical4j.model.Date
类名称:Date
方法名:equals
暂无
代码示例来源:origin: net.oneandone.ical4j/ical4j
/**
* {@inheritDoc}
*/
public boolean equals(final Object arg0) {
// TODO: what about compareTo, before, after, etc.?
if (arg0 instanceof DateTime) {
return new EqualsBuilder().append(time, ((DateTime) arg0).time)
.isEquals();
}
return super.equals(arg0);
}
代码示例来源:origin: org.bedework.ical4j/ical4j
/**
* {@inheritDoc}
*/
public boolean equals(final Object arg0) {
// TODO: what about compareTo, before, after, etc.?
if (arg0 instanceof DateTime) {
return new EqualsBuilder().append(time, ((DateTime) arg0).time)
.isEquals();
}
return super.equals(arg0);
}
代码示例来源:origin: ical4j/ical4j
/**
* {@inheritDoc}
*/
public boolean equals(final Object arg0) {
// TODO: what about compareTo, before, after, etc.?
if (arg0 instanceof DateTime) {
return new EqualsBuilder().append(time, ((DateTime) arg0).time)
.isEquals();
}
return super.equals(arg0);
}
代码示例来源:origin: org.mnode.ical4j/ical4j
/**
* {@inheritDoc}
*/
public boolean equals(final Object arg0) {
// TODO: what about compareTo, before, after, etc.?
if (arg0 instanceof DateTime) {
return new EqualsBuilder().append(time, ((DateTime) arg0).time)
.isEquals();
}
return super.equals(arg0);
}
代码示例来源:origin: org.bedework/bw-ical4j-cl
/**
* {@inheritDoc}
*/
public boolean equals(final Object arg0) {
// TODO: what about compareTo, before, after, etc.?
if (arg0 instanceof DateTime) {
return new EqualsBuilder().append(time, ((DateTime) arg0).time).isEquals();
}
return super.equals(arg0);
}
代码示例来源:origin: 1and1/cosmo
/**
* Gets modification.
* @param masterNote The master note.
* @param recurrenceId The reccurence id.
* @return The note item.
*/
private NoteItem getModification(NoteItem masterNote,
Date recurrenceId) {
for (NoteItem mod : masterNote.getModifications()) {
EventExceptionStamp exceptionStamp =
StampUtils.getEventExceptionStamp(mod);
// only interested in mods with event stamp
if (exceptionStamp == null) {
continue;
}
if (exceptionStamp.getRecurrenceId().equals(recurrenceId)) {
return mod;
}
}
return null;
}
代码示例来源:origin: net.oneandone.cosmo/cosmo-core
/**
* Gets modification.
* @param masterNote The master note.
* @param recurrenceId The reccurence id.
* @return The note item.
*/
private NoteItem getModification(NoteItem masterNote,
Date recurrenceId) {
for (NoteItem mod : masterNote.getModifications()) {
EventExceptionStamp exceptionStamp =
StampUtils.getEventExceptionStamp(mod);
// only interested in mods with event stamp
if (exceptionStamp == null) {
continue;
}
if (exceptionStamp.getRecurrenceId().equals(recurrenceId)) {
return mod;
}
}
return null;
}
代码示例来源:origin: net.oneandone.cosmo/cosmo-core
long delta = 0;
if(!newStartDate.equals(lastRecurrenceId)) {
delta = newStartDate.getTime() - lastRecurrenceId.getTime();
boolean isDtStartMissing = dtStart.equals(recurrenceId)
&& event.isAnyTime() == null;
if(recurrenceId.equals(newStartDate) && delta!=0) {
event.setStartDate(newStartDate);
代码示例来源:origin: 1and1/cosmo
long delta = 0;
if(!newStartDate.equals(lastRecurrenceId)) {
delta = newStartDate.getTime() - lastRecurrenceId.getTime();
boolean isDtStartMissing = dtStart.equals(recurrenceId)
&& event.isAnyTime() == null;
if(recurrenceId.equals(newStartDate) && delta!=0) {
event.setStartDate(newStartDate);
代码示例来源:origin: net.oneandone.cosmo/cosmo-core
/**
* Evaluates property.
* @param property The proeprty.
* @param filter The time range filter.
* @return The result.
*/
private boolean evaluate(Property property, TimeRangeFilter filter) {
if(!(property instanceof DateProperty) ) {
return false;
}
DateProperty dateProp = (DateProperty) property;
Date date = dateProp.getDate();
return date.before(filter.getPeriod().getEnd()) &&
date.after(filter.getPeriod().getStart()) ||
date.equals(filter.getPeriod().getStart()) ;
}
代码示例来源:origin: 1and1/cosmo
/**
* Evaluates property.
* @param property The proeprty.
* @param filter The time range filter.
* @return The result.
*/
private boolean evaluate(Property property, TimeRangeFilter filter) {
if(!(property instanceof DateProperty) ) {
return false;
}
DateProperty dateProp = (DateProperty) property;
Date date = dateProp.getDate();
return date.before(filter.getPeriod().getEnd()) &&
date.after(filter.getPeriod().getStart()) ||
date.equals(filter.getPeriod().getStart()) ;
}
内容来源于网络,如有侵权,请联系作者删除!