Package com.ibm.icu.text
Enum ConstrainedFieldPosition.ConstraintType
- java.lang.Object
-
- java.lang.Enum<ConstrainedFieldPosition.ConstraintType>
-
- com.ibm.icu.text.ConstrainedFieldPosition.ConstraintType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ConstrainedFieldPosition.ConstraintType>
- Enclosing class:
- ConstrainedFieldPosition
private static enum ConstrainedFieldPosition.ConstraintType extends java.lang.Enum<ConstrainedFieldPosition.ConstraintType>
Represents the type of constraint for ConstrainedFieldPosition. Constraints are used to control the behavior of iteration in FormattedValue.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ConstraintType()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConstrainedFieldPosition.ConstraintType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ConstrainedFieldPosition.ConstraintType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final ConstrainedFieldPosition.ConstraintType NONE
Represents the lack of a constraint. This is the value of fConstraint if no "constrain" methods were called.
-
CLASS
public static final ConstrainedFieldPosition.ConstraintType CLASS
Represents that the field class is constrained. This is the value of fConstraint afterConstrainedFieldPosition.constrainClass(java.lang.Class<?>)
is called. FormattedValue implementations should not change the field class when this constraint is active.
-
FIELD
public static final ConstrainedFieldPosition.ConstraintType FIELD
Represents that the field is constrained. This is the value of fConstraint afterConstrainedFieldPosition.constrainField(java.text.Format.Field)
is called. FormattedValue implementations should not change the field when this constraint is active.
-
VALUE
public static final ConstrainedFieldPosition.ConstraintType VALUE
Represents that the field value is constrained. This is the value of fConstraint afterConstrainedFieldPosition.constrainField(java.text.Format.Field)
is called. FormattedValue implementations should not change the field or value with this constraint.
-
-
Method Detail
-
values
public static ConstrainedFieldPosition.ConstraintType[] 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 (ConstrainedFieldPosition.ConstraintType c : ConstrainedFieldPosition.ConstraintType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConstrainedFieldPosition.ConstraintType 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 namejava.lang.NullPointerException
- if the argument is null
-
-