Enum StringFormatPart.Conversion

java.lang.Object
java.lang.Enum<StringFormatPart.Conversion>
org.jboss.logging.processor.validation.StringFormatPart.Conversion
All Implemented Interfaces:
Serializable, Comparable<StringFormatPart.Conversion>
Enclosing class:
StringFormatPart

public static enum StringFormatPart.Conversion extends Enum<StringFormatPart.Conversion>
The conversions for the string format.
  • Enum Constant Details

  • Field Details

    • conversion

      private final char conversion
    • ignoreCase

      final boolean ignoreCase
  • Constructor Details

    • Conversion

      private Conversion(char conversion, boolean ignoreCase)
      Private enum conversion.
      Parameters:
      conversion - the conversion character.
      ignoreCase - true for the case should be ignored, otherwise false.
  • Method Details

    • values

      public static StringFormatPart.Conversion[] 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 StringFormatPart.Conversion 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
    • isGeneral

      public boolean isGeneral()
      If the conversion is a general conversion true is returned, otherwise false.
      Returns:
      true if a general conversion, otherwise false.
    • isCharacter

      public boolean isCharacter()
      If the conversion is a character true is returned, otherwise false.
      Returns:
      true if c character, otherwise false.
    • isIntegral

      public boolean isIntegral()
      If the conversion is an integral true is returned, otherwise false.
      Returns:
      true if an integral, otherwise false.
    • isFloatingPoint

      public boolean isFloatingPoint()
      If the conversion is a floating point true is returned, otherwise false.
      Returns:
      true if a line separator, otherwise false.
    • isDateTime

      public boolean isDateTime()
      If the conversion is a date or time true is returned, otherwise false.
      Returns:
      true if a date or time, otherwise false.
    • isPercent

      public boolean isPercent()
      If the conversion is a percent true is returned, otherwise false.
      Returns:
      true if a percent, otherwise false.
    • isLineSeparator

      public boolean isLineSeparator()
      If the conversion is a line separator true is returned, otherwise false.
      Returns:
      true if a line separator, otherwise false.
    • asChar

      public char asChar()
      Returns the conversion character.
      Returns:
      the conversion character.
    • asString

      public String asString()
      Returns the conversion character as a String
      Returns:
      the conversion character.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<StringFormatPart.Conversion>
    • fromChar

      public static StringFormatPart.Conversion fromChar(char c) throws UnknownFormatConversionException
      Converts the character into a conversion descriptor.
      Parameters:
      c - the character to convert.
      Returns:
      the conversion descriptor.
      Throws:
      UnknownFormatConversionException - if the character is not a valid conversion format.