Record Class FancyDuration
java.lang.Object
java.lang.Record
de.oliver.fancylib.duration.FancyDuration
-
Constructor Summary
ConstructorsConstructorDescriptionFancyDuration(long millis) Creates an instance of aFancyDurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongdays()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longhours()booleanisNever()longmillis()Returns the value of themillisrecord component.longminutes()static FancyDurationlongseconds()@NotNull StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FancyDuration
public FancyDuration(long millis) Creates an instance of aFancyDurationrecord class.- Parameters:
millis- the value for themillisrecord component
-
-
Method Details
-
parse
-
isNever
public boolean isNever() -
seconds
public long seconds() -
minutes
public long minutes() -
hours
public long hours() -
days
public long days() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
millis
public long millis()Returns the value of themillisrecord component.- Returns:
- the value of the
millisrecord component
-