Record Class SamplerInstance.RecordedEvent<T extends Record>
java.lang.Object
java.lang.Record
ca.spottedleaf.sampler.SamplerInstance.RecordedEvent<T>
- Enclosing class:
SamplerInstance
-
Constructor Summary
ConstructorsConstructorDescriptionRecordedEvent(long timeEpochMS, long nanoTime, long tid, EventRegistry.RegisteredEvent<T> event, T value) Creates an instance of aRecordedEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.final inthashCode()Returns a hash code value for this object.longnanoTime()Returns the value of thenanoTimerecord component.longtid()Returns the value of thetidrecord component.longReturns the value of thetimeEpochMSrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
RecordedEvent
public RecordedEvent(long timeEpochMS, long nanoTime, long tid, EventRegistry.RegisteredEvent<T> event, T value) Creates an instance of aRecordedEventrecord class.- Parameters:
timeEpochMS- the value for thetimeEpochMSrecord componentnanoTime- the value for thenanoTimerecord componenttid- the value for thetidrecord componentevent- the value for theeventrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
timeEpochMS
public long timeEpochMS()Returns the value of thetimeEpochMSrecord component.- Returns:
- the value of the
timeEpochMSrecord component
-
nanoTime
public long nanoTime()Returns the value of thenanoTimerecord component.- Returns:
- the value of the
nanoTimerecord component
-
tid
public long tid()Returns the value of thetidrecord component.- Returns:
- the value of the
tidrecord component
-
event
Returns the value of theeventrecord component.- Returns:
- the value of the
eventrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-