Enum Class Wielding

Object
Enum<Wielding>
Wielding
All Implemented Interfaces:
Serializable, Comparable<Wielding>, Constable

public enum Wielding extends Enum<Wielding>
Author:
maartenl
  • Enum Constant Details

    • WIELD_LEFT

      public static final Wielding WIELD_LEFT
    • WIELD_RIGHT

      public static final Wielding WIELD_RIGHT
    • WIELD_BOTH

      public static final Wielding WIELD_BOTH
  • Method Details

    • values

      public static Wielding[] 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 Wielding 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
    • get

      public static Wielding get(int aVal)
      Recreates the constants from an integer. An integer value of 0 causes a null pointer to be returned.
      Parameters:
      aVal - the integer corresponding to the constant.
      Returns:
      the constant object
      Throws:
      RuntimeException - in case the integer provided does not correspond to any of the available objects.
    • returnWieldings

      public static Set<Wielding> returnWieldings(Integer aVal)
      Receives an integer and returns a list of Wieldings to correspond.
      Parameters:
      aVal - the integer corresponding to a number of Wieldings
      Returns:
      a List of Wieldings.
    • isIn

      public static boolean isIn(Integer aVal, Wielding aPos)
      Receives an integer and checks to see that the Wielding is a part of it.
      Parameters:
      aVal - the integer corresponding to a number of Wieldings
      aPos - the Wielding for which to check.
      Returns:
      boolean, true if the integer contains the Wielding.
    • returnValue

      public static Integer returnValue(String set)
      Parameters:
      set - for example "WIELD_LEFT, WIELD_RIGHT, WIELD_BOTH".
      Returns:
      Integer representation
    • toString

      public String toString()
      Returns the name of the format.
      Overrides:
      toString in class Enum<Wielding>
      Returns:
      format name.
    • toInt

      public int toInt()
      Returns the numerical representation of the format.
      Returns:
      identification integer.
    • parse

      public static Wielding parse(String aVal)
      Provides some parsing, a string is translated to the enum in question. For example "both" will return Wielding.WIELD_BOTH.
      Parameters:
      aVal - the string to be parsed
      Returns:
      the constant object. Will return null, if a faulty aval is provided that does not map to any of the enums.