Record Class Rule
java.lang.Object
java.lang.Record
zombie.iso.worldgen.rules.Rule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
bitmap()
Returns the value of thebitmap
record component.int[]
color()
Returns the value of thecolor
record component.int[]
Returns the value of thecondition
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.label()
Returns the value of thelabel
record component.layer()
Returns the value of thelayer
record component.static Rule
load
(BufferedReader bufferedReader, String[] var1) tiles()
Returns the value of thetiles
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Rule
public Rule(String label, int bitmap, int[] color, List<String> tiles, String layer, int[] condition) Creates an instance of aRule
record class.- Parameters:
label
- the value for thelabel
record componentbitmap
- the value for thebitmap
record componentcolor
- the value for thecolor
record componenttiles
- the value for thetiles
record componentlayer
- the value for thelayer
record componentcondition
- the value for thecondition
record component
-
-
Method Details
-
load
- Throws:
IOException
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
label
Returns the value of thelabel
record component.- Returns:
- the value of the
label
record component
-
bitmap
public int bitmap()Returns the value of thebitmap
record component.- Returns:
- the value of the
bitmap
record component
-
color
public int[] color()Returns the value of thecolor
record component.- Returns:
- the value of the
color
record component
-
tiles
-
layer
Returns the value of thelayer
record component.- Returns:
- the value of the
layer
record component
-
condition
public int[] condition()Returns the value of thecondition
record component.- Returns:
- the value of the
condition
record component
-