Record Class ContentLimit
java.lang.Object
java.lang.Record
de.eldoria.schematicsanitizer.sanitizer.limit.ContentLimit
- Record Components:
blocks- max amount of blocksnonAirBlocks- max amount of non-air blockscreatures- max amount ofCreaturesnonCreatures- max amount of nonCreatures
public record ContentLimit(int blocks, int nonAirBlocks, int creatures, int nonCreatures)
extends Record
The limit for content inside a schematic
-
Constructor Summary
ConstructorsConstructorDescriptionContentLimit(int blocks, int nonAirBlocks, int creatures, int nonCreatures) Creates an instance of aContentLimitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintblocks()Returns the value of theblocksrecord component.intReturns the value of thecreaturesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thenonAirBlocksrecord component.intReturns the value of thenonCreaturesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ContentLimit
public ContentLimit(int blocks, int nonAirBlocks, int creatures, int nonCreatures) Creates an instance of aContentLimitrecord class.- Parameters:
blocks- the value for theblocksrecord componentnonAirBlocks- the value for thenonAirBlocksrecord componentcreatures- the value for thecreaturesrecord componentnonCreatures- the value for thenonCreaturesrecord component
-
-
Method Details
-
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. All components in this record class are compared with '=='. -
blocks
public int blocks()Returns the value of theblocksrecord component.- Returns:
- the value of the
blocksrecord component
-
nonAirBlocks
public int nonAirBlocks()Returns the value of thenonAirBlocksrecord component.- Returns:
- the value of the
nonAirBlocksrecord component
-
creatures
public int creatures()Returns the value of thecreaturesrecord component.- Returns:
- the value of the
creaturesrecord component
-
nonCreatures
public int nonCreatures()Returns the value of thenonCreaturesrecord component.- Returns:
- the value of the
nonCreaturesrecord component
-