Enum StringFormatPart.Conversion

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private char conversion  
      (package private) boolean ignoreCase  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Conversion​(char conversion, boolean ignoreCase)
      Private enum conversion.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      char asChar()
      Returns the conversion character.
      java.lang.String asString()
      Returns the conversion character as a String
      static StringFormatPart.Conversion fromChar​(char c)
      Converts the character into a conversion descriptor.
      boolean isCharacter()
      If the conversion is a character true is returned, otherwise false.
      boolean isDateTime()
      If the conversion is a date or time true is returned, otherwise false.
      boolean isFloatingPoint()
      If the conversion is a floating point true is returned, otherwise false.
      boolean isGeneral()
      If the conversion is a general conversion true is returned, otherwise false.
      boolean isIntegral()
      If the conversion is an integral true is returned, otherwise false.
      boolean isLineSeparator()
      If the conversion is a line separator true is returned, otherwise false.
      boolean isPercent()
      If the conversion is a percent true is returned, otherwise false.
      java.lang.String toString()  
      static StringFormatPart.Conversion valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static StringFormatPart.Conversion[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • conversion

        private final char conversion
      • ignoreCase

        final boolean ignoreCase
    • Constructor Detail

      • 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 Detail

      • values

        public static StringFormatPart.Conversion[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (StringFormatPart.Conversion c : StringFormatPart.Conversion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static StringFormatPart.Conversion valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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 java.lang.String asString()
        Returns the conversion character as a String
        Returns:
        the conversion character.
      • fromChar

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