@@ -208,9 +208,9 @@ public String toString() {
208208 }
209209 }
210210
211- private class CologneLeftBuffer extends CologneBuffer {
211+ private class CologneOutputBuffer extends CologneBuffer {
212212
213- public CologneLeftBuffer (int buffSize ) {
213+ public CologneOutputBuffer (int buffSize ) {
214214 super (buffSize );
215215 }
216216
@@ -226,9 +226,9 @@ protected char[] copyData(int start, final int length) {
226226 }
227227 }
228228
229- private class CologneRightBuffer extends CologneBuffer {
229+ private class CologneInputBuffer extends CologneBuffer {
230230
231- public CologneRightBuffer (char [] data ) {
231+ public CologneInputBuffer (char [] data ) {
232232 super (data );
233233 }
234234
@@ -298,8 +298,8 @@ public String colognePhonetic(String text) {
298298
299299 text = preprocess (text );
300300
301- CologneLeftBuffer left = new CologneLeftBuffer (text .length () * 2 );
302- CologneRightBuffer right = new CologneRightBuffer (text .toCharArray ());
301+ CologneOutputBuffer output = new CologneOutputBuffer (text .length () * 2 );
302+ CologneInputBuffer input = new CologneInputBuffer (text .toCharArray ());
303303
304304 char nextChar ;
305305
@@ -308,13 +308,13 @@ public String colognePhonetic(String text) {
308308 char code ;
309309 char chr ;
310310
311- int rightLength = right .length ();
311+ int rightLength = input .length ();
312312
313313 while (rightLength > 0 ) {
314- chr = right .removeNext ();
314+ chr = input .removeNext ();
315315
316- if ((rightLength = right .length ()) > 0 ) {
317- nextChar = right .getNextChar ();
316+ if ((rightLength = input .length ()) > 0 ) {
317+ nextChar = input .getNextChar ();
318318 } else {
319319 nextChar = '-' ;
320320 }
@@ -336,7 +336,7 @@ public String colognePhonetic(String text) {
336336 code = '4' ;
337337 } else if (chr == 'X' && !arrayContains (new char [] { 'C' , 'K' , 'Q' }, lastChar )) {
338338 code = '4' ;
339- right .addLeft ('S' );
339+ input .addLeft ('S' );
340340 rightLength ++;
341341 } else if (chr == 'S' || chr == 'Z' ) {
342342 code = '8' ;
@@ -368,13 +368,13 @@ public String colognePhonetic(String text) {
368368 }
369369
370370 if (code != '-' && (lastCode != code && (code != '0' || lastCode == '/' ) || code < '0' || code > '8' )) {
371- left .addRight (code );
371+ output .addRight (code );
372372 }
373373
374374 lastChar = chr ;
375375 lastCode = code ;
376376 }
377- return left .toString ();
377+ return output .toString ();
378378 }
379379
380380 public Object encode (Object object ) throws EncoderException {
0 commit comments