Record Class Implementation.MiddlewareContainer
java.lang.Object
java.lang.Record
com.github.kaktushose.jda.commands.extension.Implementation.MiddlewareContainer
- Record Components:
priority
- thePriority
with which theMiddleware
should be registeredmiddleware
- theMiddleware
implementation
- All Implemented Interfaces:
Implementation.ExtensionProvidable
- Enclosing class:
Implementation<T extends Implementation.ExtensionProvidable>
public static record Implementation.MiddlewareContainer(@NotNull Priority priority, @NotNull Middleware middleware)
extends Record
implements Implementation.ExtensionProvidable
A container type for providing
Middleware
s.-
Constructor Summary
ConstructorsConstructorDescriptionMiddlewareContainer
(@NotNull Priority priority, @NotNull Middleware middleware) Creates an instance of aMiddlewareContainer
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull Middleware
Returns the value of themiddleware
record component.@NotNull Priority
priority()
Returns the value of thepriority
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MiddlewareContainer
public MiddlewareContainer(@NotNull @NotNull Priority priority, @NotNull @NotNull Middleware middleware) Creates an instance of aMiddlewareContainer
record class.- Parameters:
priority
- the value for thepriority
record componentmiddleware
- the value for themiddleware
record 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)
. -
priority
-
middleware
Returns the value of themiddleware
record component.- Returns:
- the value of the
middleware
record component
-