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

x33g5p2x  于2022-01-20 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(171)

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

Instant.compareTo介绍

暂无

代码示例

代码示例来源:origin: stanfordnlp/CoreNLP

@Override
public int compareTo(Time t) {
 Instant i = this.getJodaTimeInstant();
 Instant i2 = t.getJodaTimeInstant();
 return i.compareTo(i2);
}

代码示例来源:origin: org.jadira.usertype/usertype.jodatime

@Override
  public int compare(Object o1, Object o2) {
    return ((Instant) o1).compareTo((Instant) o2);
  }
}

代码示例来源:origin: org.jadira.usertype/usertype.jodatime

@Override
  public int compare(Object o1, Object o2) {
    return ((Instant) o1).compareTo((Instant) o2);
  }
}

代码示例来源:origin: org.jadira.usertype/usertype.core

@Override
  public int compare(Object o1, Object o2) {
    return ((Instant) o1).compareTo((Instant) o2);
  }
}

代码示例来源:origin: org.jadira.usertype/usertype.core

@Override
  public int compare(Object o1, Object o2) {
    return ((Instant) o1).compareTo((Instant) o2);
  }
}

代码示例来源:origin: org.jadira.usertype/usertype.jodatime

@Override
  public int compare(Object o1, Object o2) {
    return ((Instant) o1).compareTo((Instant) o2);
  }
}

代码示例来源:origin: org.jadira.usertype/usertype.core

@Override
  public int compare(Object o1, Object o2) {
    return ((Instant) o1).compareTo((Instant) o2);
  }
}

代码示例来源:origin: org.apache.beam/beam-sdks-java-core

@Override
public int compareTo(IntervalWindow o) {
 if (start.isEqual(o.start)) {
  return end.compareTo(o.end);
 }
 return start.compareTo(o.start);
}

代码示例来源:origin: timolson/cointrader

@Override
  public int compare(Order order, Order order2) {
    // if (event.getRemoteKey() != null && event.getRemoteKey() != null)
    //   return event.getRemoteKey().compareTo(event.getRemoteKey());
    //else
    return (order.getTime().compareTo(order2.getTime()));
  }
};

代码示例来源:origin: timolson/cointrader

@Override
  public int compare(RemoteEvent event, RemoteEvent event2) {
    // if (event.getRemoteKey() != null && event.getRemoteKey() != null)
    //   return event.getRemoteKey().compareTo(event.getRemoteKey());
    //else
    return (event.getTime().compareTo(event2.getTime()));
  }
};

代码示例来源:origin: edu.stanford.nlp/stanford-corenlp

@Override
public int compareTo(Time t) {
 Instant i = this.getJodaTimeInstant();
 Instant i2 = t.getJodaTimeInstant();
 return i.compareTo(i2);
}

代码示例来源:origin: timolson/cointrader

@Override
  public int compare(RemoteEvent event, RemoteEvent event2) {
    return event.getTimeReceived().compareTo(event2.getTimeReceived());
  }
};

代码示例来源:origin: com.guokr/stan-cn-com

public int compareTo(Time t) {
 Instant i = this.getJodaTimeInstant();
 Instant i2 = t.getJodaTimeInstant();
 return i.compareTo(i2);
}

代码示例来源:origin: edu.stanford.nlp/corenlp

public int compareTo(Time t) {
 Instant i = this.getJodaTimeInstant();
 Instant i2 = t.getJodaTimeInstant();
 return i.compareTo(i2);
}

代码示例来源:origin: org.apache.beam/beam-runners-google-cloud-dataflow-java

@Override
 public int compare(JobMessage o1, JobMessage o2) {
  @Nullable Instant t1 = fromCloudTime(o1.getTime());
  if (t1 == null) {
   return -1;
  }
  @Nullable Instant t2 = fromCloudTime(o2.getTime());
  if (t2 == null) {
   return 1;
  }
  return t1.compareTo(t2);
 }
}

代码示例来源:origin: timolson/cointrader

@Override
  public int compare(Fill event, Fill event2) {
    int sComp = event.getTime().compareTo(event2.getTime());
    if (sComp != 0) {
      return sComp;
    } else {
      return (event.getRemoteKey().compareTo(event2.getRemoteKey()));
    }
  }
};

代码示例来源:origin: timolson/cointrader

@Override
public int compare(RemoteEvent event, RemoteEvent event2) {
  int sComp = event.getTimeReceived().compareTo(event2.getTimeReceived());
  if (sComp != 0) {
    return sComp;
  } else if (event.getRemoteKey() != null && event.getRemoteKey() != null) {
    return (event.getId().compareTo(event2.getId()));
  } else
    return event.getTimeReceived().compareTo(event2.getTimeReceived());
  //   return event.getRemoteKey().compareTo(event.getRemoteKey());
}

代码示例来源:origin: org.apache.beam/beam-runners-flink_2.10

@Override
 public int compare(
   WindowedValue<KV<K, InputT>> o1,
   WindowedValue<KV<K, InputT>> o2) {
  return Iterables.getOnlyElement(o1.getWindows()).maxTimestamp()
    .compareTo(Iterables.getOnlyElement(o2.getWindows()).maxTimestamp());
 }
});

代码示例来源:origin: timolson/cointrader

@Override
public int compare(Fill fill, Fill fill2) {
  int sComp = fill.getTime().compareTo(fill2.getTime());
  if (sComp != 0) {
    return sComp;
  } else {
    return (fill2.getVolume().abs().compareTo(fill.getVolume().abs()));
  }
}

代码示例来源:origin: org.opencds.cqf/cql-engine

@Override
public Boolean equal(Object other) {
  if (this.getPartial().size() != ((BaseTemporal) other).getPartial().size()) { // Uncertainty
    return null;
  }
  return ((BaseTemporal) other).getJodaDateTime().toInstant().compareTo(this.getJodaDateTime().toInstant()) == 0;
}

相关文章