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 ofCreature
snonCreatures
- max amount of nonCreature
s
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 aContentLimit
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
blocks()
Returns the value of theblocks
record component.int
Returns the value of thecreatures
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.int
Returns the value of thenonAirBlocks
record component.int
Returns the value of thenonCreatures
record component.final String
toString()
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 aContentLimit
record class.- Parameters:
blocks
- the value for theblocks
record componentnonAirBlocks
- the value for thenonAirBlocks
record componentcreatures
- the value for thecreatures
record componentnonCreatures
- the value for thenonCreatures
record 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 theblocks
record component.- Returns:
- the value of the
blocks
record component
-
nonAirBlocks
public int nonAirBlocks()Returns the value of thenonAirBlocks
record component.- Returns:
- the value of the
nonAirBlocks
record component
-
creatures
public int creatures()Returns the value of thecreatures
record component.- Returns:
- the value of the
creatures
record component
-
nonCreatures
public int nonCreatures()Returns the value of thenonCreatures
record component.- Returns:
- the value of the
nonCreatures
record component
-