implicit final class DurationType extends AnyVal
Provides extension methods to java.time.Duration
- Alphabetic
- By Inheritance
- DurationType
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new DurationType(duration: Duration)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
def
*(n: Long): Duration
Gets duration after multiplication.
Gets duration after multiplication.
- n
number by which duration is multiplied
-
def
+(amount: Duration): Duration
Gets duration with specified amount added.
Gets duration with specified amount added.
- amount
duration to add
-
def
-(amount: Duration): Duration
Gets duration with specified amount subtracted.
Gets duration with specified amount subtracted.
- amount
duration to subtract
-
def
/(n: Long): Duration
Gets duration after division.
Gets duration after division.
- n
number by which duration is divided
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val duration: Duration
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
iterateTo(end: Duration, step: Duration = Duration.ofSeconds(1)): Iterator[Duration]
Creates iterator to end duration (inclusive).
Creates iterator to end duration (inclusive).
- end
end duration
- Exceptions thrown
IllegalArgumentExceptionifstepis zero.
-
def
iterateUntil(end: Duration, step: Duration = Duration.ofSeconds(1)): Iterator[Duration]
Creates iterator to end duration (exclusive).
Creates iterator to end duration (exclusive).
- end
end duration
-
def
max(other: Duration): Duration
Compares to other duration and returns the greater value.
Compares to other duration and returns the greater value.
- other
other duration
-
def
min(other: Duration): Duration
Compares to other duration and returns the lesser value.
Compares to other duration and returns the lesser value.
- other
other duration
-
def
toString(): String
- Definition Classes
- Any
-
def
unary_-: Duration
Gets negated duration.