Enum MatchingCaseSensitivity

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      None

      When set, it's not required to match the case for the pattern.

      FirstLetter

      When 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") // null
      All

      All 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 MatchingCaseSensitivity valueOf(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.
      • Methods inherited from class kotlin.Enum

        getName, getOrdinal
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

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