Class Patterns

java.lang.Object
org.fest.swing.util.Patterns

public final class Patterns extends Object
Understands utility methods for regular expression patterns.
  • Constructor Details

    • Patterns

      private Patterns()
  • Method Details

    • format

      public static String format(Pattern[] patterns)
      Formats the given array of regular expression patterns.

      For example, the array

       Pattern[] patterns = { Pattern.compile("hello"), Pattern.compile("world") };
       
      will be formatted as
       ['hello', 'world']
       

      Parameters:
      patterns - the array of patterns to format.
      Returns:
      the String containing the formatted array.
      Throws:
      NullPointerException - if the given array of patterns is null.
      NullPointerException - if any of the patterns in the given array is null.
    • patternValueOf

      private static String patternValueOf(Pattern pattern)