@Override public int compareAsc(@NonNull Repository lhs, @NonNull Repository rhs) { return lhs.updated_at.compareTo(rhs.updated_at); } }
@Override public int compareTo(PendingCallable<T> other) { return getScheduledTime().compareTo(other.getScheduledTime()); } }
/** * Checks if this instant is after the specified instant. * <p> * The comparison is based on the time-line position of the instants. * * @param otherInstant the other instant to compare to, not null * @return true if this instant is after the specified instant * @throws NullPointerException if otherInstant is null */ public boolean isAfter(Instant otherInstant) { return compareTo(otherInstant) > 0; }
/** * Checks if this instant is before the specified instant. * <p> * The comparison is based on the time-line position of the instants. * * @param otherInstant the other instant to compare to, not null * @return true if this instant is before the specified instant * @throws NullPointerException if otherInstant is null */ public boolean isBefore(Instant otherInstant) { return compareTo(otherInstant) < 0; }
/** * Checks if this instant is before the specified instant. * <p> * The comparison is based on the time-line position of the instants. * * @param otherInstant the other instant to compare to, not null * @return true if this instant is before the specified instant * @throws NullPointerException if otherInstant is null */ public boolean isBefore(Instant otherInstant) { return compareTo(otherInstant) < 0; }
/** * Checks if this instant is after the specified instant. * <p> * The comparison is based on the time-line position of the instants. * * @param otherInstant the other instant to compare to, not null * @return true if this instant is after the specified instant * @throws NullPointerException if otherInstant is null */ public boolean isAfter(Instant otherInstant) { return compareTo(otherInstant) > 0; }
/** * Compares this transition to another based on the transition instant. * <p> * This compares the instants of each transition. * The offsets are ignored, making this order inconsistent with equals. * * @param transition the transition to compare to, not null * @return the comparator value, negative if less, positive if greater */ @Override public int compareTo(ZoneOffsetTransition transition) { return this.getInstant().compareTo(transition.getInstant()); }
/** * Compares this transition to another based on the transition instant. * <p> * This compares the instants of each transition. * The offsets are ignored, making this order inconsistent with equals. * * @param transition the transition to compare to, not null * @return the comparator value, negative if less, positive if greater */ @Override public int compareTo(ZoneOffsetTransition transition) { return this.getInstant().compareTo(transition.getInstant()); }