Java javafx.util Duration fields, constructors, methods, implement or subclass

Example usage for Java javafx.util Duration fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javafx.util Duration.

The text is from its open source code.

Field

DurationZERO
A Duration of 0 (no time).
DurationINDEFINITE
An Infinite Duration.
doublemillis
The value of this duration, in fractional milliseconds

Constructor

Duration(@NamedArg("millis") double millis)
Creates a new Duration with potentially fractional millisecond resolution.

Method

Durationdivide(double n)
Divide this instance by a number to return a new Duration instance.
Durationdivide(Duration other)
Divide this instance by another Duration to return the ratio.
booleangreaterThan(Duration other)
Returns true if the specified duration is greater than (>) this instance.
Durationhours(double h)
Factory method that returns a Duration instance representing the specified number of hours.
Durationminutes(double m)
Factory method that returns a Duration instance representing the specified number of minutes.
Durationseconds(double s)
Factory method that returns a Duration instance representing the specified number of seconds.
Durationsubtract(Duration other)
Subtract other Duration instance from this instance to return a new Duration instance.
doubletoMillis()
Returns the number of milliseconds in this period or Double.POSITIVE_INFINITY if the period is INDEFINITE or NaN if the period is UNKNOWN.
doubletoSeconds()
Returns the number of seconds in this period or Double.POSITIVE_INFINITY if the period is INDEFINITE or NaN if the period is UNKNOWN.