Enum UnicodeSetSpanner.CountMethod

    • Enum Constant Detail

      • WHOLE_SPAN

        public static final UnicodeSetSpanner.CountMethod WHOLE_SPAN
        Collapse spans. That is, modify/count the entire matching span as a single item, instead of separate set elements.
      • MIN_ELEMENTS

        public static final UnicodeSetSpanner.CountMethod MIN_ELEMENTS
        Use the smallest number of elements in the spanned range for counting and modification, based on the UnicodeSet.SpanCondition. If the set has no strings, this will be the same as the number of spanned code points.

        For example, in the string "abab" with SpanCondition.SIMPLE:

        • spanning with [ab] will count four MIN_ELEMENTS.
        • spanning with [{ab}] will count two MIN_ELEMENTS.
        • spanning with [ab{ab}] will also count two MIN_ELEMENTS.
    • Method Detail

      • values

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

        public static UnicodeSetSpanner.CountMethod 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