Class RegExStringFilter

java.lang.Object
repast.simphony.filter.RegExStringFilter
All Implemented Interfaces:
Filter<String>
Direct Known Subclasses:
ClassPathFilter

public class RegExStringFilter extends Object implements Filter<String>
String filter that matches using regular expressions.
Author:
Nick Collier
  • Field Details

    • pattern

      protected Pattern pattern
  • Constructor Details

    • RegExStringFilter

      protected RegExStringFilter()
    • RegExStringFilter

      public RegExStringFilter(String regEx)
      Creates a RegExStringFilter that will evaluate to true if the passed in String matches the specified regular expression.
      Parameters:
      regEx - the regular expression to match
  • Method Details

    • evaluate

      public boolean evaluate(String object)
      Specified by:
      evaluate in interface Filter<String>
    • getPattern

      public String getPattern()
      Gets the regular expression pattern for this RegExFilter.
      Returns:
      the regular expression pattern for this RegExFilter.