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

x33g5p2x  于2022-01-17 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(182)

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

DateTime.equals介绍

暂无

代码示例

代码示例来源:origin: joelittlejohn/jsonschema2pojo

@Override
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if ((other instanceof ExternalDependencies) == false) {
    return false;
  }
  ExternalDependencies rhs = ((ExternalDependencies) other);
  return (((this.aJodaTimeObject == rhs.aJodaTimeObject)||((this.aJodaTimeObject!= null)&&this.aJodaTimeObject.equals(rhs.aJodaTimeObject)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))));
}

代码示例来源:origin: apache/incubator-druid

@Override
public boolean equals(Object o)
{
 if (this == o) {
  return true;
 }
 if (o == null || getClass() != o.getClass()) {
  return false;
 }
 DataSourceMetadataResultValue that = (DataSourceMetadataResultValue) o;
 if (maxIngestedEventTime != null
   ? !maxIngestedEventTime.equals(that.maxIngestedEventTime)
   : that.maxIngestedEventTime != null) {
  return false;
 }
 return true;
}

代码示例来源:origin: aws/aws-sdk-java

@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  TimestampValue that = (TimestampValue) o;
  return value.equals(that.value);
}

代码示例来源:origin: apache/incubator-druid

@Override
public boolean equals(Object o)
{
 if (this == o) {
  return true;
 }
 if (o == null || getClass() != o.getClass()) {
  return false;
 }
 Bucket bucket = (Bucket) o;
 if (partitionNum != bucket.partitionNum) {
  return false;
 }
 if (shardNum != bucket.shardNum) {
  return false;
 }
 if (time != null ? !time.equals(bucket.time) : bucket.time != null) {
  return false;
 }
 return true;
}

代码示例来源:origin: apache/incubator-druid

@Override
public boolean equals(Object o)
{
 if (this == o) {
  return true;
 }
 if (o == null || getClass() != o.getClass()) {
  return false;
 }
 MapBasedRow that = (MapBasedRow) o;
 if (!event.equals(that.event)) {
  return false;
 }
 if (!timestamp.equals(that.timestamp)) {
  return false;
 }
 return true;
}

代码示例来源:origin: apache/incubator-druid

@Override
public boolean equals(Object o)
{
 if (this == o) {
  return true;
 }
 if (o == null || getClass() != o.getClass()) {
  return false;
 }
 TimestampSpec that = (TimestampSpec) o;
 if (!timestampColumn.equals(that.timestampColumn)) {
  return false;
 }
 if (!timestampFormat.equals(that.timestampFormat)) {
  return false;
 }
 return !(missingValue != null ? !missingValue.equals(that.missingValue) : that.missingValue != null);
}

代码示例来源:origin: apache/incubator-druid

@Override
public boolean equals(Object o)
{
 if (o == this) {
  return true;
 }
 if (o == null || getClass() != o.getClass()) {
  return false;
 }
 final SupervisorReport that = (SupervisorReport) o;
 if (!id.equals(that.id)) {
  return false;
 }
 if (!generationTime.equals(that.generationTime)) {
  return false;
 }
 return payload.equals(that.payload);
}

代码示例来源:origin: fabric8io/docker-maven-plugin

@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  Timestamp timestamp = (Timestamp) o;
  if (rest != timestamp.rest) return false;
  if (!date.equals(timestamp.date)) return false;
  return 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 TimedPhase phase1 = (TimedPhase) o;
  if (phase != null ? !phase.equals(phase1.phase) : phase1.phase != null) {
    return false;
  }
  if (startPhase != null ? !startPhase.equals(phase1.startPhase) : phase1.startPhase != null) {
    return false;
  }
  return true;
}

代码示例来源:origin: apache/incubator-gobblin

@Override
public int compareTo(FileSystemDatasetVersion other) {
 TimestampedDatasetVersion otherAsDateTime = (TimestampedDatasetVersion) other;
 return this.version.equals(otherAsDateTime.version) ? 0 : this.version.compareTo(otherAsDateTime.version);
}

代码示例来源:origin: apache/incubator-druid

@Override
public boolean equals(Object o)
{
 if (this == o) {
  return true;
 }
 if (o == null || getClass() != o.getClass()) {
  return false;
 }
 AuditEntry entry = (AuditEntry) o;
 if (!auditTime.equals(entry.auditTime)) {
  return false;
 }
 if (!auditInfo.equals(entry.auditInfo)) {
  return false;
 }
 if (!key.equals(entry.key)) {
  return false;
 }
 if (!payload.equals(entry.payload)) {
  return false;
 }
 if (!type.equals(entry.type)) {
  return false;
 }
 return true;
}

代码示例来源:origin: apache/incubator-druid

public static boolean isEmpty(Interval interval)
{
 return interval.getStart().equals(interval.getEnd());
}

代码示例来源:origin: apache/incubator-druid

@Override
public boolean equals(Object o)
{
 if (this == o) {
  return true;
 }
 if (o == null || getClass() != o.getClass()) {
  return false;
 }
 ImmutableWorkerInfo that = (ImmutableWorkerInfo) o;
 if (currCapacityUsed != that.currCapacityUsed) {
  return false;
 }
 if (!worker.equals(that.worker)) {
  return false;
 }
 if (!availabilityGroups.equals(that.availabilityGroups)) {
  return false;
 }
 if (!runningTasks.equals(that.runningTasks)) {
  return false;
 }
 if (!lastCompletedTaskTime.equals(that.lastCompletedTaskTime)) {
  return false;
 }
 return !(blacklistedUntil != null
      ? !blacklistedUntil.equals(that.blacklistedUntil)
      : that.blacklistedUntil != null);
}

代码示例来源:origin: apache/incubator-gobblin

@Override
public int compareTo(FileSystemDatasetVersion other) {
 TimestampedDatasetVersion otherAsDateTime = (TimestampedDatasetVersion) other;
 return this.version.equals(otherAsDateTime.version) ? this.path.compareTo(otherAsDateTime.path)
   : this.version.compareTo(otherAsDateTime.version);
}

代码示例来源:origin: apache/incubator-druid

@Override
 public boolean apply(@Nullable Pair<DruidServerMetadata, DataSegment> input)
 {
  return input.rhs.getInterval().getStart().equals(SEGMENT_INTERVAL_START.plusDays(INITIAL_SEGMENTS + 2));
 }
}

代码示例来源:origin: apache/incubator-druid

/**
 * Removes {@code smallInterval} from {@code largeInterval}.  The end of both intervals should be same.
 *
 * @return an interval of {@code largeInterval} - {@code smallInterval}.
 */
static Interval removeIntervalFromEnd(Interval largeInterval, Interval smallInterval)
{
 Preconditions.checkArgument(
   largeInterval.getEnd().equals(smallInterval.getEnd()),
   "end should be same. largeInterval[%s] smallInterval[%s]",
   largeInterval,
   smallInterval
 );
 return new Interval(largeInterval.getStart(), smallInterval.getStart());
}

代码示例来源:origin: apache/incubator-druid

if (!remainingStart.equals(remainingEnd)) {
 filteredIntervals.add(new Interval(remainingStart, remainingEnd));

代码示例来源:origin: gocd/gocd

@Test
  public void shouldGiveTimeoutTime() throws Exception {
    DateTime expected = new DateTime().plusMillis((int) Timeout.NINETY_SECONDS.inMillis());
    DateTime actual = new SystemTimeClock().timeoutTime(Timeout.NINETY_SECONDS);
    assertThat(actual.equals(expected) || actual.isAfter(expected),is(true));
  }
}

代码示例来源:origin: apache/incubator-druid

DateTime anotherCreatedTime = provisioner.getStats().toList().get(0).getTimestamp();
Assert.assertTrue(
  createdTime.equals(anotherCreatedTime)
);

代码示例来源:origin: apache/incubator-druid

@Test
public void testMergeResults()
{
 List<Result<TimeBoundaryResultValue>> results = Arrays.asList(
   new Result<>(
     DateTimes.nowUtc(),
     new TimeBoundaryResultValue(
       ImmutableMap.of(
         "maxTime", "2012-01-01",
         "minTime", "2011-01-01"
       )
     )
   ),
   new Result<>(
     DateTimes.nowUtc(),
     new TimeBoundaryResultValue(
       ImmutableMap.of(
         "maxTime", "2012-02-01",
         "minTime", "2011-01-01"
       )
     )
   )
 );
 TimeBoundaryQuery query = new TimeBoundaryQuery(new TableDataSource("test"), null, null, null, null);
 Iterable<Result<TimeBoundaryResultValue>> actual = query.mergeResults(results);
 Assert.assertTrue(actual.iterator().next().getValue().getMaxTime().equals(DateTimes.of("2012-02-01")));
}

相关文章

DateTime类方法