Class RegularExpressionString


  • public class RegularExpressionString
    extends java.lang.Object
    A wrapper for a string containing a regular expression.
    Since:
    Ptolemy II 8.0
    Version:
    $Id$
    Author:
    Thomas Huining Feng
    Pt.AcceptedRating:
    Red (tfeng)
    Pt.ProposedRating:
    Yellow (tfeng)
    • Constructor Summary

      Constructors 
      Constructor Description
      RegularExpressionString()
      Construct a Ptolemy expression string.
      RegularExpressionString​(java.lang.String value)
      Construct a Ptolemy expression string with the given value as its initial value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String get()
      Get the current value.
      java.util.regex.Pattern getPattern()
      Get the pattern for the regular expression.
      void set​(java.lang.String value)
      Set the value.
      java.lang.String toString()
      Return the regular expression in a string.
      • Methods inherited from class java.lang.Object

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

      • RegularExpressionString

        public RegularExpressionString()
        Construct a Ptolemy expression string.
      • RegularExpressionString

        public RegularExpressionString​(java.lang.String value)
        Construct a Ptolemy expression string with the given value as its initial value.
        Parameters:
        value - The initial value.
    • Method Detail

      • get

        public java.lang.String get()
        Get the current value.
        Returns:
        The value.
        See Also:
        set(String)
      • getPattern

        public java.util.regex.Pattern getPattern()
        Get the pattern for the regular expression.
        Returns:
        The pattern.
      • set

        public void set​(java.lang.String value)
        Set the value.
        Parameters:
        value - The value.
        See Also:
        get()
      • toString

        public java.lang.String toString()
        Return the regular expression in a string.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The regular expression.