diff src/org/tmatesoft/hg/util/PathRewrite.java @ 292:a415fe296a50

Refactor PathRewrite to accept any char sequence, not only string
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 14 Sep 2011 02:16:19 +0200
parents 37a34044e6bd
children
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/util/PathRewrite.java	Wed Sep 14 02:12:47 2011 +0200
+++ b/src/org/tmatesoft/hg/util/PathRewrite.java	Wed Sep 14 02:16:19 2011 +0200
@@ -27,11 +27,10 @@
  */
 public interface PathRewrite {
 
-	// XXX think over CharSequence use instead of String
-	public String rewrite(String path);
+	public CharSequence rewrite(CharSequence path);
 	
 	public static class Empty implements PathRewrite {
-		public String rewrite(String path) {
+		public CharSequence rewrite(CharSequence path) {
 			return path;
 		}
 	}
@@ -51,7 +50,7 @@
 			return this;
 		}
 
-		public String rewrite(String path) {
+		public CharSequence rewrite(CharSequence path) {
 			for (PathRewrite pr : chain) {
 				path = pr.rewrite(path);
 			}