commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1063350 - /commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java
Date Tue, 25 Jan 2011 16:56:55 GMT
Author: ggregory
Date: Tue Jan 25 16:56:55 2011
New Revision: 1063350

URL: http://svn.apache.org/viewvc?rev=1063350&view=rev
Log:
CologneBuffer does not need to implement CharSequence which then does not need to implement
charAt and subSequence, which are themselves not used.

Modified:
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java?rev=1063350&r1=1063349&r2=1063350&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java
(original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/ColognePhonetic.java
Tue Jan 25 16:56:55 2011
@@ -180,7 +180,7 @@ import org.apache.commons.codec.StringEn
  */
 public class ColognePhonetic implements StringEncoder {
 
-    private abstract class CologneBuffer implements CharSequence {
+    private abstract class CologneBuffer {
 
         protected final char[] data;
         protected int length = 0;
@@ -191,15 +191,8 @@ public class ColognePhonetic implements 
         }
 
         public CologneBuffer(int buffSize) {
-            data = new char[buffSize];
-        }
-
-        public char charAt(int index) {
-            if (index < length) {
-                return data[index];
-            } else {
-                throw new IndexOutOfBoundsException();
-            }
+            this.data = new char[buffSize];
+            this.length = 0;
         }
 
         protected abstract char[] copyData(int start, final int length);
@@ -210,12 +203,6 @@ public class ColognePhonetic implements 
             return length;
         }
 
-        public CharSequence subSequence(int start, int end) {
-            final int length = end - start;
-            char[] newData = copyData(start, length);
-            return createCologneBuffer(newData);
-        }
-
         public String toString() {
             return new String(copyData(0, length));
         }



Mime
View raw message