Package de.oliver.fancynpcs.api.util
Klasse Interval
java.lang.Object
de.oliver.fancynpcs.api.util.Interval
Interval is simple (but not very extensible) object that provides methods for
unit conversion and creation of human-readable 'elapsed time' strings.
This API is for internal use only and can change at any time.
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung@NotNull Intervaladd(long n, @NotNull Interval.Unit unit) @NotNull Intervaldoubleas(@NotNull Interval.Unit unit) Returns interval converted to specifiedInterval.Unit(unit).static @NotNull Intervalbetween(double n, double m, @NotNull Interval.Unit unit) static @NotNull Intervalbetween(long n, long m, @NotNull Interval.Unit unit) static @NotNull Intervalnow()ReturnsIntervalobject of current time.static @NotNull Intervalof(double interval, @NotNull Interval.Unit unit) static @NotNull Intervalof(long interval, @NotNull Interval.Unit unit) @NotNull Intervalremove(long n, @NotNull Interval.Unit unit) @NotNull Interval@NotNull DatetoDate()@NotNull Instant@NotNull StringtoString()
-
Konstruktordetails
-
Interval
public Interval(long value)
-
-
Methodendetails
-
now
ReturnsIntervalobject of current time. -
of
-
of
-
between
@NotNull public static @NotNull Interval between(long n, long m, @NotNull @NotNull Interval.Unit unit) -
between
@NotNull public static @NotNull Interval between(double n, double m, @NotNull @NotNull Interval.Unit unit) -
as
Returns interval converted to specifiedInterval.Unit(unit).
Interval.of(1500, Interval.Unit.MILLISECONDS).as(Interval.Unit.SECONDS) // 1.5F Interval.of(300, Interval.Unit.SECONDS).as(Interval.Unit.MINUTES) // 5F
-
add
-
add
-
remove
-
remove
-
toDate
-
toInstant
-
toString
-