com.ibm.icu.text
Class DateTimePatternGenerator.VariableField

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

Deprecated. This API is ICU internal only.

public static class DateTimePatternGenerator.VariableField
extends java.lang.Object

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".

Status:
Internal. This API is ICU internal only.

Constructor Summary
DateTimePatternGenerator.VariableField(java.lang.String string)
          Deprecated. This API is ICU internal only.
DateTimePatternGenerator.VariableField(java.lang.String string, boolean strict)
          Deprecated. This API is ICU internal only.
 
Method Summary
 int getType()
          Deprecated. This API is ICU internal only.
protected  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

DateTimePatternGenerator.VariableField

public DateTimePatternGenerator.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.
Status:
Internal. This API is ICU internal only.

DateTimePatternGenerator.VariableField

public DateTimePatternGenerator.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.
Status:
Internal. This API is ICU internal only.
Method Detail

getType

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.
Status:
Internal. This API is ICU internal only.

isNumeric

protected 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.
Status:
Internal. This API is ICU internal only.

toString

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
Status:
Internal. This API is ICU internal only.


Copyright (c) 2011 IBM Corporation and others.