Enum Gender

java.lang.Object
java.lang.Enum<Gender>
es.gob.jmulticard.card.icao.Gender
All Implemented Interfaces:
Serializable, Comparable<Gender>, java.lang.constant.Constable

public enum Gender extends Enum<Gender>
Sexo del titular de un MRTD.
  • Enum Constant Details

    • MALE

      public static final Gender MALE
      Hombre.
    • FEMALE

      public static final Gender FEMALE
      Mujer.
  • Field Details

    • desc

      private final String desc
      Texto descriptivo del sexo.
  • Constructor Details

    • Gender

      private Gender(String d)
      Constructor.
      Parameters:
      d - Texto descriptivo del sexo del titular.
  • Method Details

    • values

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

      public static Gender valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Gender>
    • getGender

      public static Gender getGender(String text)
      Obtiene el sexo del titular a partir del texto correspondiente en la MRZ del MRTD.
      Parameters:
      text - Texto correspondiente al sexo en la MRZ del MRTD. Debe ser "F" (female) o "M" (male).
      Returns:
      Sexo del titular del MRTD.