Class StringFilter

    • Method Detail

      • startsWith

        @Contract(value="_ -> new",
                  pure=true)
        @NotNull
        public static @NotNull StringFilter startsWith​(@NotNull
                                                       @NotNull String prefix)
        Creates a filter to check if the String starts with the specified String.
        Parameters:
        prefix - the prefix
        Returns:
        the StringFilter
      • startsWithIgnoreCase

        @Contract(value="_ -> new",
                  pure=true)
        @NotNull
        public static @NotNull StringFilter startsWithIgnoreCase​(@NotNull
                                                                 @NotNull String prefix)
        Creates a filter to check if the String starts with the specified String.

        This filter is not case-sensitive.

        Parameters:
        prefix - the prefix
        Returns:
        the StringFilter
      • endsWith

        @Contract(value="_ -> new",
                  pure=true)
        @NotNull
        public static @NotNull StringFilter endsWith​(@NotNull
                                                     @NotNull String suffix)
        Creates a filter to check if the String ends with the specified String.
        Parameters:
        suffix - the suffix
        Returns:
        the StringFilter
      • endsWithIgnoreCase

        @Contract(value="_ -> new",
                  pure=true)
        @NotNull
        public static @NotNull StringFilter endsWithIgnoreCase​(@NotNull
                                                               @NotNull String suffix)
        Creates a filter to check if the String ends with the specified String.

        This filter is not case-sensitive.

        Parameters:
        suffix - the suffix
        Returns:
        the StringFilter
      • lengthRange

        @Contract(value="_ -> new",
                  pure=true)
        @NotNull
        public static @NotNull StringFilter lengthRange​(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int min,
                                                        @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int max)
                                                 throws IllegalArgumentException
        Creates a filter to check the length of String.
        Parameters:
        min - minimum length
        max - maximum length
        Returns:
        the StringFilter
        Throws:
        IllegalArgumentException - if the minimum or maximum value is less than zero or if the minimum value is greater than the maximum value
      • maxLength

        @Contract(value="_ -> new",
                  pure=true)
        @NotNull
        public static @NotNull StringFilter maxLength​(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int max)
        Creates a filter to check the length of String.
        Parameters:
        max - maximum length
        Returns:
        the StringFilter
        Throws:
        IllegalArgumentException - if the maximum value is less than zero
      • minLength

        @Contract(value="_ -> new",
                  pure=true)
        @NotNull
        public static @NotNull StringFilter minLength​(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int min)
        Creates a filter to check the length of String.
        Parameters:
        min - minimum length
        Returns:
        the StringFilter
        Throws:
        IllegalArgumentException - if the minimum value is less than zero
      • regex

        @Contract(value="_ -> new",
                  pure=true)
        @NotNull
        public static @NotNull StringFilter regex​(@NotNull
                                                  @NotNull String regex)
        Create a filter using a regular expression.
        Parameters:
        regex - the regex
        Returns:
        the StringFilter
      • regex

        @Contract(value="_ -> new",
                  pure=true)
        @NotNull
        public static @NotNull StringFilter regex​(@NotNull
                                                  @NotNull Pattern pattern)
        Create a filter using a Pattern.
        Parameters:
        pattern - the pattern
        Returns:
        the StringFilter