ruper2/src/java/core/org/krysalis/ruper/util/regexp RegularExpressionSelector.java,1.1,1.2 RegularExpression.java,1.1,1.2

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/util/regexp
In directory sc8-pr-cvs1:/tmp/cvs-serv17387/src/java/core/org/krysalis/ruper/util/regexp

Modified Files:
	RegularExpressionSelector.java RegularExpression.java 
Log Message:
Some pretttiness on output
Working on the ant task some more.

Index: RegularExpressionSelector.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/util/regexp/RegularExpressionSelector.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RegularExpressionSelector.java	4 Sep 2003 16:45:54 -0000	1.1
--- RegularExpressionSelector.java	12 Sep 2003 13:28:22 -0000	1.2
***************
*** 38,40 ****
--- 38,44 ----
  		return m_regexp.match(data);
  	}
+ 	
+ 	public String toString() {
+ 		return m_regexp.toString();
+ 	}
  }

Index: RegularExpression.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/util/regexp/RegularExpression.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RegularExpression.java	4 Sep 2003 16:45:54 -0000	1.1
--- RegularExpression.java	12 Sep 2003 13:28:22 -0000	1.2
***************
*** 18,21 ****
--- 18,22 ----
   */
  public class RegularExpression {
+ 	private final String m_expression;
  	private final RE m_regexp;
  
***************
*** 24,29 ****
  	public RegularExpression(String expression) {
  		try {
! 			if (m_cached.containsKey(expression))
  				m_regexp = (RE) m_cached.get(expression);
  			else {
  				m_regexp = new RE(expression);
--- 25,32 ----
  	public RegularExpression(String expression) {
  		try {
! 			m_expression = expression;
! 			if (m_cached.containsKey(expression)) {
  				m_regexp = (RE) m_cached.get(expression);
+ 			}
  			else {
  				m_regexp = new RE(expression);
***************
*** 40,43 ****
--- 43,47 ----
  
  	public RegularExpression(RE expression) {
+ 		m_expression = expression.toString();
  		m_regexp = expression;
  	}
***************
*** 45,48 ****
--- 49,56 ----
  	public boolean match(String input) {
  		return m_regexp.match(input);
+ 	}
+ 
+ 	public String toString() {
+ 		return m_expression;
  	}
  }




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.