Record Class ExpirationStrategy.Inactivity
java.lang.Object
java.lang.Record
com.github.kaktushose.jda.commands.dispatching.expiration.ExpirationStrategy.Inactivity
- Record Components:
afterMinutes
- the amount of time after aRuntime
should be closed, in minutes.
- All Implemented Interfaces:
ExpirationStrategy
- Enclosing interface:
ExpirationStrategy
public static record ExpirationStrategy.Inactivity(long afterMinutes)
extends Record
implements ExpirationStrategy
ExpirationStrategy
that closes a Runtime
after the passed amount of time.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.kaktushose.jda.commands.dispatching.expiration.ExpirationStrategy
ExpirationStrategy.Explicit, ExpirationStrategy.Inactivity
-
Field Summary
Fields inherited from interface com.github.kaktushose.jda.commands.dispatching.expiration.ExpirationStrategy
AFTER_15_MINUTES, EXPLICIT
-
Constructor Summary
ConstructorDescriptionInactivity
(long afterMinutes) Creates an instance of aInactivity
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the value of theafterMinutes
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Inactivity
public Inactivity(long afterMinutes) Creates an instance of aInactivity
record class.- Parameters:
afterMinutes
- the value for theafterMinutes
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 with thecompare
method from their corresponding wrapper classes. -
afterMinutes
public long afterMinutes()Returns the value of theafterMinutes
record component.- Returns:
- the value of the
afterMinutes
record component
-