@Override
    public int compareTo(Instant otherInstant) {
        int cmp = Jdk8Methods.compareLongs(seconds, otherInstant.seconds);
        if (cmp != 0) {
            return cmp;
        }
        return nanos - otherInstant.nanos;
    }
@ Override public int compareTo ( Instant otherInstant ) { int cmp = Jdk8Methods . compareLongs ( seconds , otherInstant . seconds ) ; if ( cmp != 0 ) { return cmp ; } return nanos - otherInstant . nanos ; }
Compares this instant to the specified instant.
<p>
The comparison is based on the time-line position of the instants.
It is "consistent with equals", as defined by {@link Comparable}.

@param otherInstant  the other instant to compare to, not null
@return the comparator value, negative if less, positive if greater
@throws NullPointerException if otherInstant is null