Class DateTimePatternGenerator.VariableField

  • Enclosing class:
    DateTimePatternGenerator

    @Deprecated
    public static class DateTimePatternGenerator.VariableField
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      VariableField​(java.lang.String string)
      Deprecated.
      This API is ICU internal only.
      VariableField​(java.lang.String string, boolean strict)
      Deprecated.
      This API is ICU internal only.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.lang.String getCanonicalCode​(int type)
      Deprecated.
      This API is ICU internal only.
      int getType()
      Deprecated.
      This API is ICU internal only.
      boolean isNumeric()
      Deprecated.
      This API is ICU internal only.
      java.lang.String toString()
      Deprecated.
      This API is ICU internal only.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • VariableField

        @Deprecated
        public VariableField​(java.lang.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​(java.lang.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:
        java.lang.IllegalArgumentException - if the variable field is not valid.
    • Method Detail

      • 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 java.lang.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 java.lang.String toString()
        Deprecated.
        This API is ICU internal only.
        Get the string represented by this variable.
        Overrides:
        toString in class java.lang.Object