Enum Class DataKey

java.lang.Object
java.lang.Enum<DataKey>
rekit.persistence.level.DataKey
All Implemented Interfaces:
Serializable, Comparable<DataKey>, Constable

public enum DataKey extends Enum<DataKey>
This enum contains the keys for level-data which can be saved to a user-dat file.
Author:
Dominik Fuchss
See Also:
  • Enum Constant Details

    • HIGH_SCORE

      public static final DataKey HIGH_SCORE
      The highscore of a level.
    • SUCCESS

      public static final DataKey SUCCESS
      Indicates whether the last try was successful.
    • WON

      public static final DataKey WON
      Indicates whether any try was successful.
  • Method Details

    • values

      public static DataKey[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DataKey valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • atEnd

      public static void atEnd(DataKeySetter parent)
      Invoke after a level has ended.
      Parameters:
      parent - the data key setter for the level
    • getDefaultVal

      public Serializable getDefaultVal()
      Get the default value of the DataKey.
      Returns:
      the default value