Class Interval
java.lang.Object
de.oliver.fancynpcs.api.utils.Interval
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@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()
-
Constructor Details
-
Interval
public Interval(long value)
-
-
Method Details
-
now
-
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
-