Record Class Rule

java.lang.Object
java.lang.Record
zombie.iso.worldgen.rules.Rule

public record Rule(String label, int bitmap, int[] color, List<String> tiles, String layer, int[] condition) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    Rule(String label, int bitmap, int[] color, List<String> tiles, String layer, int[] condition)
    Creates an instance of a Rule record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the bitmap record component.
    int[]
    Returns the value of the color record component.
    int[]
    Returns the value of the condition record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the label record component.
    Returns the value of the layer record component.
    static Rule
    load(BufferedReader bufferedReader, String[] var1)
     
    Returns the value of the tiles record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Rule

      public Rule(String label, int bitmap, int[] color, List<String> tiles, String layer, int[] condition)
      Creates an instance of a Rule record class.
      Parameters:
      label - the value for the label record component
      bitmap - the value for the bitmap record component
      color - the value for the color record component
      tiles - the value for the tiles record component
      layer - the value for the layer record component
      condition - the value for the condition record component
  • Method Details

    • load

      public static Rule load(BufferedReader bufferedReader, String[] var1) throws IOException
      Throws:
      IOException
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • bitmap

      public int bitmap()
      Returns the value of the bitmap record component.
      Returns:
      the value of the bitmap record component
    • color

      public int[] color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • tiles

      public List<String> tiles()
      Returns the value of the tiles record component.
      Returns:
      the value of the tiles record component
    • layer

      public String layer()
      Returns the value of the layer record component.
      Returns:
      the value of the layer record component
    • condition

      public int[] condition()
      Returns the value of the condition record component.
      Returns:
      the value of the condition record component