Package gg.xp.xivsupport.timelines
Record Class VisualTimelineEntry
java.lang.Object
java.lang.Record
gg.xp.xivsupport.timelines.VisualTimelineEntry
- All Implemented Interfaces:
LabelOverride,CurrentMaxPair
public record VisualTimelineEntry(TimelineEntry originalTimelineEntry, boolean isCurrentSync, double timeUntil, int barTimeBasis)
extends Record
implements LabelOverride, CurrentMaxPair
-
Constructor Summary
ConstructorsConstructorDescriptionVisualTimelineEntry(TimelineEntry originalTimelineEntry, boolean isCurrentSync, double timeUntil, int barTimeBasis) Creates an instance of aVisualTimelineEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebarTimeBasisrecord component.longcurrent()booleanIndicates whether some other object is "equal to" this one.getLabel()inthashCode()Returns a hash code value for this object.booleanReturns the value of theisCurrentSyncrecord component.longmax()Returns the value of theoriginalTimelineEntryrecord component.doublebooleandoubleReturns the value of thetimeUntilrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface gg.xp.xivsupport.models.CurrentMaxPair
getPercent, getShortString, isEmpty, isFull
-
Constructor Details
-
VisualTimelineEntry
public VisualTimelineEntry(TimelineEntry originalTimelineEntry, boolean isCurrentSync, double timeUntil, int barTimeBasis) Creates an instance of aVisualTimelineEntryrecord class.- Parameters:
originalTimelineEntry- the value for theoriginalTimelineEntryrecord componentisCurrentSync- the value for theisCurrentSyncrecord componenttimeUntil- the value for thetimeUntilrecord componentbarTimeBasis- the value for thebarTimeBasisrecord component
-
-
Method Details
-
getLabel
- Specified by:
getLabelin interfaceLabelOverride
-
shouldDisplay
public boolean shouldDisplay() -
current
public long current()- Specified by:
currentin interfaceCurrentMaxPair
-
max
public long max()- Specified by:
maxin interfaceCurrentMaxPair
-
remainingActiveTime
public double remainingActiveTime() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
originalTimelineEntry
Returns the value of theoriginalTimelineEntryrecord component.- Returns:
- the value of the
originalTimelineEntryrecord component
-
isCurrentSync
public boolean isCurrentSync()Returns the value of theisCurrentSyncrecord component.- Returns:
- the value of the
isCurrentSyncrecord component
-
timeUntil
public double timeUntil()Returns the value of thetimeUntilrecord component.- Returns:
- the value of the
timeUntilrecord component
-
barTimeBasis
public int barTimeBasis()Returns the value of thebarTimeBasisrecord component.- Returns:
- the value of the
barTimeBasisrecord component
-