Record Class StructuresSectionSpigot.Result
java.lang.Object
java.lang.Record
nl.pim16aap2.animatedarchitecture.spigot.core.config.StructuresSectionSpigot.Result
- Record Components:
structureResults- A map of structure types to their respective results.flagMovementFormula- The formula used for the movement of flag structures.
- All Implemented Interfaces:
IConfigSectionResult
- Enclosing class:
StructuresSectionSpigot
public static record StructuresSectionSpigot.Result(Map<StructureType, StructuresSectionSpigot.StructureResult> structureResults, String flagMovementFormula)
extends Record
implements IConfigSectionResult
Represents the result of the StructuresSection configuration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StructuresSectionSpigot.ResultThe default result used when no data is available. -
Constructor Summary
ConstructorsConstructorDescriptionResult(Map<StructureType, StructuresSectionSpigot.StructureResult> structureResults, String flagMovementFormula) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublefinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theflagMovementFormularecord component.org.bukkit.MaterialguiMaterial(StructureType type) final inthashCode()Returns a hash code value for this object.booleanof(StructureType structureType) Retrieves theStructuresSectionSpigot.StructureResultfor a specific structure type.priceFormula(StructureType type) Returns the value of thestructureResultsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
The default result used when no data is available.
-
-
Constructor Details
-
Result
public Result(Map<StructureType, StructuresSectionSpigot.StructureResult> structureResults, String flagMovementFormula) Creates an instance of aResultrecord class.- Parameters:
structureResults- the value for thestructureResultsrecord componentflagMovementFormula- the value for theflagMovementFormularecord component
-
-
Method Details
-
of
Retrieves theStructuresSectionSpigot.StructureResultfor a specific structure type.- Parameters:
structureType- The structure type for which to retrieve the result.- Returns:
- The
StructuresSectionSpigot.StructureResultfor the specified structure type, orStructuresSectionSpigot.StructureResult.DEFAULTresult if not found.
-
isStructureTypeEnabled
-
priceFormula
-
animationTimeMultiplier
-
guiMaterial
-
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). -
structureResults
Returns the value of thestructureResultsrecord component.- Returns:
- the value of the
structureResultsrecord component
-
flagMovementFormula
Returns the value of theflagMovementFormularecord component.- Returns:
- the value of the
flagMovementFormularecord component
-