Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement base Duration API #6

Open
33 of 59 tasks
Clockwork-Muse opened this issue Oct 6, 2020 · 0 comments
Open
33 of 59 tasks

Implement base Duration API #6

Clockwork-Muse opened this issue Oct 6, 2020 · 0 comments
Assignees

Comments

@Clockwork-Muse
Copy link
Contributor

Clockwork-Muse commented Oct 6, 2020

  • Duration abs() Returns a copy of this duration with a positive length.
  • Delayed to meta Temporal addTo​(Temporal temporal) Adds this duration to the specified temporal object.
  • Delayed to meta static Duration between​(Temporal startInclusive, Temporal endExclusive) Obtains a Duration representing the duration between two temporal objects.~ - Delayed to meta
  • int compareTo​(Duration otherDuration) Compares this duration to the specified Duration. - Using comparison operators
  • Duration dividedBy​(long divisor) Returns a copy of this duration divided by the specified value.
  • long dividedBy​(Duration divisor) Returns number of whole times a specified Duration occurs within this Duration.
  • boolean equals​(Object otherDuration) Checks if this duration is equal to the specified Duration.
  • Delayed to meta static Duration from​(TemporalAmount amount) Obtains an instance of Duration from a temporal amount.
  • Delayed to metalong get​(TemporalUnit unit) Gets the value of the requested unit.
  • int getNano() Gets the number of nanoseconds within the second in this duration.
  • long getSeconds() Gets the number of seconds in this duration.
  • Delayed to meta List<TemporalUnit> getUnits() Gets the set of units supported by this duration.
  • int hashCode() A hash code for this duration. - Auto derived
  • boolean isNegative() Checks if this duration is negative, excluding zero. - Ignoring in favor of comparison operators
  • boolean isZero() Checks if this duration is zero length. - Ignoring in favor of comparison operators
  • Delayed to meta Duration minus​(long amountToSubtract, TemporalUnit unit) Returns a copy of this duration with the specified duration subtracted.
  • Duration minus​(Duration duration) Returns a copy of this duration with the specified duration subtracted.
  • Duration minusDays​(long daysToSubtract) Returns a copy of this duration with the specified duration in standard 24 hour days subtracted.
  • Duration minusHours​(long hoursToSubtract) Returns a copy of this duration with the specified duration in hours subtracted.
  • Duration minusMillis​(long millisToSubtract) Returns a copy of this duration with the specified duration in milliseconds subtracted.
  • Duration minusMinutes​(long minutesToSubtract) Returns a copy of this duration with the specified duration in minutes subtracted.
  • Duration minusNanos​(long nanosToSubtract) Returns a copy of this duration with the specified duration in nanoseconds subtracted.
  • Duration minusSeconds​(long secondsToSubtract) Returns a copy of this duration with the specified duration in seconds subtracted.
  • Duration multipliedBy​(long multiplicand) Returns a copy of this duration multiplied by the scalar.
  • Duration negated() Returns a copy of this duration with the length negated.
  • Delayed to meta static Duration of​(long amount, TemporalUnit unit) Obtains a Duration representing an amount in the specified unit.
  • static Duration ofDays​(long days) Obtains a Duration representing a number of standard 24 hour days.
  • static Duration ofHours​(long hours) Obtains a Duration representing a number of standard hours.
  • static Duration ofMillis​(long millis) Obtains a Duration representing a number of milliseconds.
  • static Duration ofMinutes​(long minutes) Obtains a Duration representing a number of standard minutes.
  • static Duration ofNanos​(long nanos) Obtains a Duration representing a number of nanoseconds.
  • static Duration ofSeconds​(long seconds) Obtains a Duration representing a number of seconds.
  • static Duration ofSeconds​(long seconds, long nanoAdjustment) Obtains a Duration representing a number of seconds and an adjustment in nanoseconds.
  • static Duration parse​(CharSequence text) Obtains a Duration from a text string such as PnDTnHnMn.nS.
  • Delayed to meta Duration plus​(long amountToAdd, TemporalUnit unit) Returns a copy of this duration with the specified duration added.
  • Duration plus​(Duration duration) Returns a copy of this duration with the specified duration added.
  • Duration plusDays​(long daysToAdd) Returns a copy of this duration with the specified duration in standard 24 hour days added.
  • Duration plusHours​(long hoursToAdd) Returns a copy of this duration with the specified duration in hours added.
  • Duration plusMillis​(long millisToAdd) Returns a copy of this duration with the specified duration in milliseconds added.
  • Duration plusMinutes​(long minutesToAdd) Returns a copy of this duration with the specified duration in minutes added.
  • Duration plusNanos​(long nanosToAdd) Returns a copy of this duration with the specified duration in nanoseconds added.
  • Duration plusSeconds​(long secondsToAdd) Returns a copy of this duration with the specified duration in seconds added.
  • Delayed to meta Temporal subtractFrom​(Temporal temporal) Subtracts this duration from the specified temporal object.
  • long toDays() Gets the number of days in this duration.
  • long toDaysPart() Extracts the number of days in the duration.
  • long toHours() Gets the number of hours in this duration.
  • int toHoursPart() Extracts the number of hours part in the duration.
  • long toMillis() Converts this duration to the total length in milliseconds.
  • int toMillisPart() Extracts the number of milliseconds part of the duration.
  • long toMinutes() Gets the number of minutes in this duration.
  • int toMinutesPart() Extracts the number of minutes part in the duration.
  • long toNanos() Converts this duration to the total length in nanoseconds expressed as a long.
  • int toNanosPart() Get the nanoseconds part within seconds of the duration.
  • long toSeconds() Gets the number of seconds in this duration.
  • int toSecondsPart() Extracts the number of seconds part in the duration.
  • String toString() A string representation of this duration using ISO-8601 seconds based representation, such as PT8H6M12.345S.
  • Delayed to meta Duration truncatedTo​(TemporalUnit unit) Returns a copy of this Duration truncated to the specified unit.
  • Duration withNanos​(int nanoOfSecond) Returns a copy of this duration with the specified nano-of-second.
  • Duration withSeconds​(long seconds) Returns a copy of this duration with the specified amount of seconds.
@Clockwork-Muse Clockwork-Muse self-assigned this Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant