Enum MatchingCaseSensitivity
-
- All Implemented Interfaces:
-
java.io.Serializable,kotlin.Comparable
public enum MatchingCaseSensitivity extends Enum<MatchingCaseSensitivity>
Case sensitivity options for matching.
Swing equivalent: NameUtil.MatchingCaseSensitivity
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NoneWhen set, it's not required to match the case for the pattern.
FirstLetterWhen set, The first letter from a pattern block must match the case.
Examples:
val matcher = SpeedSearchMatcher.patternMatcher("AbCd", caseSensitivity = MatchingCaseSensitivity.FirstLetter) // Match exact case matcher.matches("AbCdef") // [0..4] // Matching upper case with lower case from pattern, if that's not the first letter matcher.matches("ABCdef") // [0..4] matcher.matches("AbCDef") // [0..4] matcher.matches("ABCDef") // [0..4] // Does not match if any upper case from pattern is not in the text matcher.matches("abCdef") // null matcher.matches("Abcdef") // null matcher.matches("abcdef") // nullAllAll cases must match for the pattern to match.
Examples:
val matcher = SpeedSearchMatcher.patternMatcher("AnEyeForAnEye", caseSensitivity = MatchingCaseSensitivity.All) // Match exact case matcher.matches("An Eye For An Eye") // [0..2, 3..6, 7..10, 11..13, 14..17] // Does not match case matcher.matches("AN EYE FOR AN EYE") // null matcher.matches("an eye for an eye") // null matcher.matches("AN Eye For An Eye") // null
-
Method Summary
Modifier and Type Method Description final MatchingCaseSensitivityvalueOf(String value)Returns the enum constant of this type with the specified name. final Array<MatchingCaseSensitivity>values()Returns an array containing the constants of this enum type, in the order they're declared. -
-
Method Detail
-
valueOf
final MatchingCaseSensitivity valueOf(String value)
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.)
-
values
final Array<MatchingCaseSensitivity> values()
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
-
-
-
-