ptolemy.actor.gt.util
Class RegularExpressionString

java.lang.Object
  extended by ptolemy.actor.gt.util.RegularExpressionString

public class RegularExpressionString
extends java.lang.Object

A wrapper for a string containing a regular expression.

Since:
Ptolemy II 8.0
Version:
$Id: RegularExpressionString.java 57046 2010-01-27 23:35:53Z cxh $
Author:
Thomas Huining Feng
Accepted Rating:
Red (tfeng)
Proposed Rating:
Yellow (tfeng)

Field Summary
private  boolean _needReparse
          Whether the regular expression needs to be reparsed.
private  java.util.regex.Pattern _pattern
          The pattern for the regular expression.
private  java.lang.String _value
          The regular expression.
 
Constructor Summary
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
 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
 

Field Detail

_needReparse

private boolean _needReparse
Whether the regular expression needs to be reparsed.


_pattern

private java.util.regex.Pattern _pattern
The pattern for the regular expression.


_value

private java.lang.String _value
The regular expression.

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.