Package dev.kitteh.factions.upgrade
Record Class Upgrade.ReactiveImpl
java.lang.Object
java.lang.Record
dev.kitteh.factions.upgrade.Upgrade.ReactiveImpl
- All Implemented Interfaces:
Upgrade,Upgrade.Impl
- Enclosing interface:
Upgrade
@Internal
public static record Upgrade.ReactiveImpl(String name, Function<TranslationsConfig.Upgrades,TranslationsConfig.Upgrades.UpgradeDetail> tl, int maxLevel, Set<UpgradeVariable> variables, Upgrade.Reactor reactor)
extends Record
implements Upgrade.Impl
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.kitteh.factions.upgrade.Upgrade
Upgrade.Impl, Upgrade.Reactive, Upgrade.ReactiveImpl, Upgrade.Reactor, Upgrade.Simple, Upgrade.SimpleImpl -
Constructor Summary
ConstructorsConstructorDescriptionReactiveImpl(String name, Function<TranslationsConfig.Upgrades, TranslationsConfig.Upgrades.UpgradeDetail> tl, int maxLevel, Set<UpgradeVariable> variables, Upgrade.Reactor reactor) Creates an instance of aReactiveImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmaxLevel()Returns the value of themaxLevelrecord component.name()Returns the value of thenamerecord component.voidCalled by the plugin when a faction changes level of this upgrade, potentially executing code.reactor()Returns the value of thereactorrecord component.tl()Returns the value of thetlrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevariablesrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.kitteh.factions.upgrade.Upgrade.Impl
description, details, nameComponent
-
Constructor Details
-
ReactiveImpl
public ReactiveImpl(String name, Function<TranslationsConfig.Upgrades, TranslationsConfig.Upgrades.UpgradeDetail> tl, int maxLevel, Set<UpgradeVariable> variables, Upgrade.Reactor reactor) Creates an instance of aReactiveImplrecord class.- Parameters:
name- the value for thenamerecord componenttl- the value for thetlrecord componentmaxLevel- the value for themaxLevelrecord componentvariables- the value for thevariablesrecord componentreactor- the value for thereactorrecord component
-
-
Method Details
-
onChange
Description copied from interface:UpgradeCalled by the plugin when a faction changes level of this upgrade, potentially executing code. -
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
name
Returns the value of thenamerecord component. -
tl
Returns the value of thetlrecord component.- Specified by:
tlin interfaceUpgrade.Impl- Returns:
- the value of the
tlrecord component
-
maxLevel
public int maxLevel()Returns the value of themaxLevelrecord component. -
variables
Returns the value of thevariablesrecord component. -
reactor
Returns the value of thereactorrecord component.- Returns:
- the value of the
reactorrecord component
-