本文整理了Java中org.joda.time.LocalDateTime.isAfter()
方法的一些代码示例,展示了LocalDateTime.isAfter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDateTime.isAfter()
方法的具体详情如下:
包路径:org.joda.time.LocalDateTime
类名称:LocalDateTime
方法名:isAfter
暂无
代码示例来源:origin: apache/incubator-gobblin
@Override
public boolean hasNext() {
return !startDate.isAfter(endDate);
}
代码示例来源:origin: org.apache.gobblin/gobblin-data-management
@Override
public boolean hasNext() {
return !startDate.isAfter(endDate);
}
代码示例来源:origin: org.jresearch.commons.base/org.jresearch.commons.base.domain
public boolean expired() {
return new LocalDateTime().isAfter(expirationDate);
}
代码示例来源:origin: kiselev-dv/gazetteer
@Override
public void handle(String s) {
String[] split = StringUtils.split(s, '\t');
if(split != null && split.length >= 3) {
if(split[0].equals(itg.id)) {
LocalDateTime t = new LocalDateTime(StringUtils.removeEnd(split[1], "Z"));
if(itg.timestamp == null || t.isAfter(itg.timestamp)) {
itg.geometry = split[2];
itg.timestamp = t;
}
}
else {
if(itg.id != null) {
tmpW.println(itg.id + '\t' + itg.timestamp.toString() + '\t' + itg.geometry);
}
itg.id = split[0];
itg.geometry = split[2];
itg.timestamp = LocalDateTime.parse(split[1]);
}
}
}
代码示例来源:origin: effektif/effektif
@Override
public WorkflowId findLatestWorkflowIdBySource(String workflowName) {
if (workflowName==null) {
return null;
}
ExecutableWorkflow latestWorkflow = null;
LocalDateTime latestDeployTime = null;
for (ExecutableWorkflow workflow: workflows.values()) {
if ( workflowName.equals(workflow.getSourceWorkflowId())
&& (latestDeployTime==null || latestDeployTime.isAfter(workflow.getCreateTime())) ) {
latestWorkflow = workflow;
latestDeployTime = workflow.getCreateTime();
}
}
return latestWorkflow!=null ? latestWorkflow.getId() : null;
}
代码示例来源:origin: com.effektif/effektif-workflow-api
@Override
public LocalDateTime resolve(LocalDateTime base) {
LocalDateTime time = null;
if (HOUR_OF_DAY.equals(indexUnit)) {
time = base.withTime(index, 0, 0, 0);
if (!time.isAfter(base)) {
return time.plusDays(1);
}
} else if (DAY_OF_WEEK.equals(indexUnit)) {
time = base
.withDayOfWeek(index)
.withTime(0, 0, 0, 0);
if (!time.isAfter(base)) {
time = time.plusWeeks(1);
}
} else if (DAY_OF_MONTH.equals(indexUnit)) {
time = base
.withDayOfMonth(index)
.withTime(0, 0, 0, 0);
if (!time.isAfter(base)) {
time = time.plusMonths(1);
}
}
if (atHour!=null) {
time = time.withTime(atHour, atMinute!=null ? atMinute : 0, 0, 0);
}
return time;
}
代码示例来源:origin: effektif/effektif
@Override
public LocalDateTime resolve(LocalDateTime base) {
LocalDateTime time = null;
if (HOUR_OF_DAY.equals(indexUnit)) {
time = base.withTime(index, 0, 0, 0);
if (!time.isAfter(base)) {
return time.plusDays(1);
}
} else if (DAY_OF_WEEK.equals(indexUnit)) {
time = base
.withDayOfWeek(index)
.withTime(0, 0, 0, 0);
if (!time.isAfter(base)) {
time = time.plusWeeks(1);
}
} else if (DAY_OF_MONTH.equals(indexUnit)) {
time = base
.withDayOfMonth(index)
.withTime(0, 0, 0, 0);
if (!time.isAfter(base)) {
time = time.plusMonths(1);
}
}
if (atHour!=null) {
time = time.withTime(atHour, atMinute!=null ? atMinute : 0, 0, 0);
}
return time;
}
代码示例来源:origin: com.synaptix/SynaptixWidget
@Override
protected boolean isCoherent() {
if ((hasMinComplete()) && (hasMaxComplete()) && (getMin().isAfter(getMax()))) {
return false;
}
return true;
}
代码示例来源:origin: com.synaptix/SynaptixWidget
@Override
protected boolean isCoherent() {
if ((hasMinComplete()) && (hasMaxComplete()) && (getMin().isAfter(getMax()))) {
return false;
}
return true;
}
代码示例来源:origin: com.github.blasd.apex/apex-java
ApexLogHelper.getNiceRate(startEvent.getProgress().getAsLong(), seconds, TimeUnit.SECONDS);
if (activeSince.isAfter(oldBarrier)) {
LOGGER.trace(LOG_MESSAGE_PROGRESS, activeSince, rate, time, cleanKey);
} else if (activeSince.isBefore(muchtooOldBarrier)) {
if (activeSince.isAfter(oldBarrier)) {
LOGGER.trace(LOG_MESSAGE, activeSince, time, cleanKey);
} else if (activeSince.isBefore(muchtooOldBarrier)) {
代码示例来源:origin: tcplugins/tcWebHooks
@Override
public int compare(WebHookHistoryItem o1, WebHookHistoryItem o2) {
if (sortDirection == SortDirection.DESC) {
if (o1.getTimestamp().isBefore(o2.getTimestamp())){
return 1;
} else if (o1.getTimestamp().isAfter(o2.getTimestamp())){
return -1;
} else {
return 0;
}
} else {
if (o1.getTimestamp().isAfter(o2.getTimestamp())){
return 1;
} else if (o1.getTimestamp().isBefore(o2.getTimestamp())){
return -1;
} else {
return 0;
}
}
}
}
代码示例来源:origin: te-con/ehour
} else if (now.isAfter(end)) {
percentage = Optional.of(100f);
} else {
代码示例来源:origin: org.kuali.kpme/kpme-tk-lm-impl
display.append(startDateString);
display.append(" - ");
String endDateString = weekEnd.minusDays(1).isAfter(endDate) ?
endDate.toString(TkConstants.DT_ABBREV_DATE_FORMAT) : weekEnd.minusDays(1).toString(TkConstants.DT_ABBREV_DATE_FORMAT);
display.append(endDateString);
display.append(startDateString);
display.append(" - ");
String endDateString = actualEndDate.isAfter(endDate) ?
endDate.toString(TkConstants.DT_ABBREV_DATE_FORMAT) : actualEndDate.toString(TkConstants.DT_ABBREV_DATE_FORMAT);
display.append(endDateString);
代码示例来源:origin: org.assertj/assertj-joda-time
/**
* Verifies that the actual {@code LocalDateTime} is before or equals to the given one.
* <p>
* Example :
* <pre><code class='java'> assertThat(new LocalDateTime("2000-01-01")).isBeforeOrEqualTo(new LocalDateTime("2000-01-01"))
* .isBeforeOrEqualTo(new LocalDateTime("2000-01-02"));</code></pre>
*
* @param other the given {@link LocalDateTime}.
* @return this assertion object.
* @throws AssertionError if the actual {@code LocalDateTime} is {@code null}.
* @throws IllegalArgumentException if other {@code LocalDateTime} is {@code null}.
* @throws AssertionError if the actual {@code LocalDateTime} is not before or equals to the given one.
*/
public LocalDateTimeAssert isBeforeOrEqualTo(LocalDateTime other) {
Objects.instance().assertNotNull(info, actual);
assertLocalDateTimeParameterIsNotNull(other);
if (actual.isAfter(other)) {
throw Failures.instance().failure(info, shouldBeBeforeOrEqualsTo(actual, other));
}
return this;
}
代码示例来源:origin: org.assertj/assertj-joda-time
/**
* Verifies that the actual {@code LocalDateTime} is <b>strictly</b> after the given one.
* <p>
* Example :
* <pre><code class='java'> assertThat(new LocalDateTime("2000-01-01")).isAfter(new LocalDateTime("1999-12-31"));</code></pre>
*
* @param other the given {@link LocalDateTime}.
* @return this assertion object.
* @throws AssertionError if the actual {@code LocalDateTime} is {@code null}.
* @throws IllegalArgumentException if other {@code LocalDateTime} is {@code null}.
* @throws AssertionError if the actual {@code LocalDateTime} is not strictly after the given one.
*/
public LocalDateTimeAssert isAfter(LocalDateTime other) {
Objects.instance().assertNotNull(info, actual);
assertLocalDateTimeParameterIsNotNull(other);
if (!actual.isAfter(other)) {
throw Failures.instance().failure(info, shouldBeAfter(actual, other));
}
return this;
}
代码示例来源:origin: itesla/ipst
private boolean matches(HistoKey k, Map<String, Object> map, QueryParams query) {
if (query.getHorizon() != null && !query.getHorizon().equals(k.getHorizon())) {
return false;
}
if (query.getDayTimeFrom() != null && query.getDayTimeTo() != null) {
LocalDateTime check = new DateTime(k.getDateTime()).toLocalDateTime();
LocalDateTime from = new DateTime(query.getDayTimeFrom()).toLocalDateTime();
LocalDateTime to = new DateTime(query.getDayTimeTo()).toLocalDateTime();
LocalDateTime start = new DateTime(k.getDateTime()).toLocalDateTime().withHourOfDay(from.getHourOfDay())
.withMinuteOfHour(from.getMinuteOfHour()).withSecondOfMinute(from.getSecondOfMinute());
LocalDateTime end = new DateTime(k.getDateTime()).toLocalDateTime().withHourOfDay(to.getHourOfDay())
.withMinuteOfHour(to.getMinuteOfHour()).withSecondOfMinute(to.getSecondOfMinute());
if (check.isAfter(end) || check.isBefore(start)) {
return false;
}
}
if (query.getForecastTime() >= 0) {
if (k.getForecastDistance() != query.getForecastTime()) {
return false;
}
}
return true;
}
内容来源于网络,如有侵权,请联系作者删除!