Record Class EventRegistry.RegisteredEvent<T extends Record>
java.lang.Object
java.lang.Record
ca.spottedleaf.sampler.EventRegistry.RegisteredEvent<T>
- Enclosing class:
EventRegistry
public static record EventRegistry.RegisteredEvent<T extends Record>(String name, Class<T extends Record> cls, RecordComponent[] recordComponents, Constructor<T extends Record> constructor)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionRegisteredEvent(String name, Class<T> cls, RecordComponent[] recordComponents, Constructor<T> constructor) Creates an instance of aRegisteredEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncls()Returns the value of theclsrecord component.Returns the value of theconstructorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of therecordComponentsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RegisteredEvent
public RegisteredEvent(String name, Class<T> cls, RecordComponent[] recordComponents, Constructor<T> constructor) Creates an instance of aRegisteredEventrecord class.- Parameters:
name- the value for thenamerecord componentcls- the value for theclsrecord componentrecordComponents- the value for therecordComponentsrecord componentconstructor- the value for theconstructorrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
cls
-
recordComponents
Returns the value of therecordComponentsrecord component.- Returns:
- the value of the
recordComponentsrecord component
-
constructor
Returns the value of theconstructorrecord component.- Returns:
- the value of the
constructorrecord component
-