com.hp.lft.sdk.uiapro

Enum TextUnit

Supported in UFT Developer version 24.2 and later

UIA Pro is supported as a technical preview.

  • All Implemented Interfaces:
    com.hp.lft.sdk.internal.EnumValueProvider<Integer>, Serializable, Comparable<TextUnit>


    public enum TextUnit
    extends Enum<TextUnit>
    implements com.hp.lft.sdk.internal.EnumValueProvider<Integer>
    The possible unit lengths to use when navigating within a document.
    • Enum Constant Detail

      • Line

        public static final TextUnit Line
        Specifies that the text unit is one line in length.
      • Page

        public static final TextUnit Page
        Specifies that the text unit is one document-specific page in length.
    • Method Detail

      • values

        public static TextUnit[] 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 (TextUnit c : TextUnit.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TextUnit valueOf(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getValue

        public Integer getValue()
        Returns the integer value representing the TextUnit value.
        Specified by:
        getValue in interface com.hp.lft.sdk.internal.EnumValueProvider<Integer>
        Returns:
        the integer value representing the TextUnit value.