java.time.zone 支持时区及其规则。 java.util.concurrent 实用类通常在并发编程中有用。 jdk.jfr 该软件包提供了用于创建事件和控制Flight Recorder的类。 jdk.jfr.consumer 此程序包包含用于使用Flight Recorder数据的类。 Uses of Duration in java.lang Methods in java.lang that return types with argume...
Methods in java.time that return Duration Modifier and TypeMethod and Description Duration Duration.abs() Returns a copy of this duration with a positive length. static Duration Duration.between(Temporal startInclusive, Temporal endExclusive) Obtains a Duration representing the duration between two ...
withSeconds(long seconds) Returns a copy of this duration with the specified amount of seconds. Methods declared in class java.lang.Object clone, finalize, getClass, notify, notifyAll, wait, wait, waitField Details ZERO public static final Duration ZERO Constant for a duration of zero. Me...
Methods inherited from class java.lang.Object getClass,notify,notifyAll,wait,wait,wait Constructor Detail Duration public Duration() getUnit publicStringgetUnit() Specifies the unit of a maintenance schedule duration. Valid value is HOURS. See theDeveloper Guidefor more information. ...
Java documentation forjava.time.Duration. Portions of this page are modifications based on work created and shared by theAndroid Open Source Projectand used according to terms described in theCreative Commons 2.5 Attribution License. Properties
These components are ordered in their significance by their order of appearance i.e. as year, month, day, hour, minute, and second. </blockquote> All six values are set by computing their values from the specified milliseconds and are available using the get methods of the created Duration...
Returns an array containing the constants of this enum type, in the order they are declared. Methods inherited from class java.lang.Enum compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf Methods inherited from class java.lang.Object getClass, notify, notifyAll, wait, w...
All six values are set by computing their values from the specified milliseconds and are available using thegetmethods of the createdDuration. The values conform to and are defined by: ISO 8601:2000(E) Section 5.5.3.2 Alternative format W3C XML Schema 1.0 Part 2, Appendix D, ISO 8601 Date...
In the above example, thetoComponents()method breaks down a duration into hours, minutes, seconds, and nanoseconds, allowing for effortless use of each component. Moreover, multipletoComponents()methods are available, each returning different units for added versatility. ...
Methods inherited from class java.lang.Object equals, getClass, hashCode, notify, notifyAll, wait, wait, wait Field Detail HOURS_AS_INT public static final int HOURS_AS_INT An int value associated with the HOURS instance of this class. Consider using the static instances of this class instead...