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
ConstructorDescriptionVisualTimelineEntry
(TimelineEntry originalTimelineEntry, boolean isCurrentSync, double timeUntil, int barTimeBasis) Creates an instance of aVisualTimelineEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thebarTimeBasis
record component.long
current()
boolean
Indicates whether some other object is "equal to" this one.getLabel()
int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisCurrentSync
record component.long
max()
Returns the value of theoriginalTimelineEntry
record component.double
boolean
double
Returns the value of thetimeUntil
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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 aVisualTimelineEntry
record class.- Parameters:
originalTimelineEntry
- the value for theoriginalTimelineEntry
record componentisCurrentSync
- the value for theisCurrentSync
record componenttimeUntil
- the value for thetimeUntil
record componentbarTimeBasis
- the value for thebarTimeBasis
record component
-
-
Method Details
-
getLabel
- Specified by:
getLabel
in interfaceLabelOverride
-
shouldDisplay
public boolean shouldDisplay() -
current
public long current()- Specified by:
current
in interfaceCurrentMaxPair
-
max
public long max()- Specified by:
max
in 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 theoriginalTimelineEntry
record component.- Returns:
- the value of the
originalTimelineEntry
record component
-
isCurrentSync
public boolean isCurrentSync()Returns the value of theisCurrentSync
record component.- Returns:
- the value of the
isCurrentSync
record component
-
timeUntil
public double timeUntil()Returns the value of thetimeUntil
record component.- Returns:
- the value of the
timeUntil
record component
-
barTimeBasis
public int barTimeBasis()Returns the value of thebarTimeBasis
record component.- Returns:
- the value of the
barTimeBasis
record component
-