Class DateTimePatternGenerator.VariableField

java.lang.Object
com.ibm.icu.text.DateTimePatternGenerator.VariableField
Enclosing class:
DateTimePatternGenerator

@Deprecated public static class DateTimePatternGenerator.VariableField extends Object
Deprecated.
This API is ICU internal only.
Utility class for FormatParser. Immutable class that is only used to mark the difference between a variable field and a literal string. Each variable field must consist of 1 to n variable characters, representing date format fields. For example, "VVVV" is valid while "V4" is not, nor is "44".
  • Constructor Details

    • VariableField

      @Deprecated public VariableField(String string)
      Deprecated.
      This API is ICU internal only.
      Create a variable field: equivalent to VariableField(string,false);
      Parameters:
      string - The string for the variable field.
    • VariableField

      @Deprecated public VariableField(String string, boolean strict)
      Deprecated.
      This API is ICU internal only.
      Create a variable field
      Parameters:
      string - The string for the variable field
      strict - If true, then only allows exactly those lengths specified by CLDR for variables. For example, "hh:mm aa" would throw an exception.
      Throws:
      IllegalArgumentException - if the variable field is not valid.
  • Method Details

    • getType

      @Deprecated public int getType()
      Deprecated.
      This API is ICU internal only.
      Get the main type of this variable. These types are ERA, QUARTER, MONTH, DAY, WEEK_OF_YEAR, WEEK_OF_MONTH, WEEKDAY, DAY, DAYPERIOD (am/pm), HOUR, MINUTE, SECOND,FRACTIONAL_SECOND, ZONE.
      Returns:
      main type.
    • getCanonicalCode

      @Deprecated public static String getCanonicalCode(int type)
      Deprecated.
      This API is ICU internal only.
    • isNumeric

      @Deprecated public boolean isNumeric()
      Deprecated.
      This API is ICU internal only.
      Check if the type of this variable field is numeric.
      Returns:
      true if the type of this variable field is numeric.
    • toString

      @Deprecated public String toString()
      Deprecated.
      This API is ICU internal only.
      Get the string represented by this variable.
      Overrides:
      toString in class Object