Skip to content

Commit f282e95

Browse files
committed
Rename pString to str, pObject to obj
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1306455 13f79535-47bb-0310-9956-ffa450edef68
1 parent 327a795 commit f282e95

9 files changed

Lines changed: 148 additions & 148 deletions

File tree

src/main/java/org/apache/commons/codec/binary/BaseNCodec.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,17 @@ private void reset() {
258258
* Encodes an Object using the Base-N algorithm. This method is provided in order to satisfy the requirements of the
259259
* Encoder interface, and will throw an EncoderException if the supplied object is not of type byte[].
260260
*
261-
* @param pObject
261+
* @param obj
262262
* Object to encode
263263
* @return An object (of type byte[]) containing the Base-N encoded data which corresponds to the byte[] supplied.
264264
* @throws EncoderException
265265
* if the parameter supplied is not of type byte[]
266266
*/
267-
public Object encode(Object pObject) throws EncoderException {
268-
if (!(pObject instanceof byte[])) {
267+
public Object encode(Object obj) throws EncoderException {
268+
if (!(obj instanceof byte[])) {
269269
throw new EncoderException("Parameter supplied to Base-N encode is not a byte[]");
270270
}
271-
return encode((byte[]) pObject);
271+
return encode((byte[]) obj);
272272
}
273273

274274
/**
@@ -286,17 +286,17 @@ public String encodeToString(byte[] pArray) {
286286
* Decodes an Object using the Base-N algorithm. This method is provided in order to satisfy the requirements of the
287287
* Decoder interface, and will throw a DecoderException if the supplied object is not of type byte[] or String.
288288
*
289-
* @param pObject
289+
* @param obj
290290
* Object to decode
291291
* @return An object (of type byte[]) containing the binary data which corresponds to the byte[] or String supplied.
292292
* @throws DecoderException
293293
* if the parameter supplied is not of type byte[]
294294
*/
295-
public Object decode(Object pObject) throws DecoderException {
296-
if (pObject instanceof byte[]) {
297-
return decode((byte[]) pObject);
298-
} else if (pObject instanceof String) {
299-
return decode((String) pObject);
295+
public Object decode(Object obj) throws DecoderException {
296+
if (obj instanceof byte[]) {
297+
return decode((byte[]) obj);
298+
} else if (obj instanceof String) {
299+
return decode((String) obj);
300300
} else {
301301
throw new DecoderException("Parameter supplied to Base-N decode is not a byte[] or a String");
302302
}

src/main/java/org/apache/commons/codec/language/Caverphone.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,29 @@ public String caverphone(String source) {
6262
* Encodes an Object using the caverphone algorithm. This method is provided in order to satisfy the requirements of
6363
* the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.
6464
*
65-
* @param pObject
65+
* @param obj
6666
* Object to encode
6767
* @return An object (or type java.lang.String) containing the caverphone code which corresponds to the String
6868
* supplied.
6969
* @throws EncoderException
7070
* if the parameter supplied is not of type java.lang.String
7171
*/
72-
public Object encode(Object pObject) throws EncoderException {
73-
if (!(pObject instanceof String)) {
72+
public Object encode(Object obj) throws EncoderException {
73+
if (!(obj instanceof String)) {
7474
throw new EncoderException("Parameter supplied to Caverphone encode is not of type java.lang.String");
7575
}
76-
return this.caverphone((String) pObject);
76+
return this.caverphone((String) obj);
7777
}
7878

7979
/**
8080
* Encodes a String using the Caverphone algorithm.
8181
*
82-
* @param pString
82+
* @param str
8383
* String object to encode
8484
* @return The caverphone code corresponding to the String supplied
8585
*/
86-
public String encode(String pString) {
87-
return this.caverphone(pString);
86+
public String encode(String str) {
87+
return this.caverphone(str);
8888
}
8989

9090
/**

src/main/java/org/apache/commons/codec/language/Metaphone.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -357,27 +357,27 @@ private boolean isLastChar(int wdsz, int n) {
357357
* Encoder interface, and will throw an EncoderException if the
358358
* supplied object is not of type java.lang.String.
359359
*
360-
* @param pObject Object to encode
360+
* @param obj Object to encode
361361
* @return An object (or type java.lang.String) containing the
362362
* metaphone code which corresponds to the String supplied.
363363
* @throws EncoderException if the parameter supplied is not
364364
* of type java.lang.String
365365
*/
366-
public Object encode(Object pObject) throws EncoderException {
367-
if (!(pObject instanceof String)) {
366+
public Object encode(Object obj) throws EncoderException {
367+
if (!(obj instanceof String)) {
368368
throw new EncoderException("Parameter supplied to Metaphone encode is not of type java.lang.String");
369369
}
370-
return metaphone((String) pObject);
370+
return metaphone((String) obj);
371371
}
372372

373373
/**
374374
* Encodes a String using the Metaphone algorithm.
375375
*
376-
* @param pString String object to encode
376+
* @param str String object to encode
377377
* @return The metaphone code corresponding to the String supplied
378378
*/
379-
public String encode(String pString) {
380-
return metaphone(pString);
379+
public String encode(String str) {
380+
return metaphone(str);
381381
}
382382

383383
/**

src/main/java/org/apache/commons/codec/language/Nysiis.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,32 +198,32 @@ public Nysiis(final boolean strict) {
198198
* Encoder interface, and will throw an {@link EncoderException} if the supplied object is not of type
199199
* {@link String}.
200200
*
201-
* @param pObject
201+
* @param obj
202202
* Object to encode
203203
* @return An object (or a {@link String}) containing the NYSIIS code which corresponds to the given String.
204204
* @throws EncoderException
205205
* if the parameter supplied is not of a {@link String}
206206
* @throws IllegalArgumentException
207207
* if a character is not mapped
208208
*/
209-
public Object encode(Object pObject) throws EncoderException {
210-
if (!(pObject instanceof String)) {
209+
public Object encode(Object obj) throws EncoderException {
210+
if (!(obj instanceof String)) {
211211
throw new EncoderException("Parameter supplied to Nysiis encode is not of type java.lang.String");
212212
}
213-
return this.nysiis((String) pObject);
213+
return this.nysiis((String) obj);
214214
}
215215

216216
/**
217217
* Encodes a String using the NYSIIS algorithm.
218218
*
219-
* @param pString
219+
* @param str
220220
* A String object to encode
221221
* @return A Nysiis code corresponding to the String supplied
222222
* @throws IllegalArgumentException
223223
* if a character is not mapped
224224
*/
225-
public String encode(String pString) {
226-
return this.nysiis(pString);
225+
public String encode(String str) {
226+
return this.nysiis(str);
227227
}
228228

229229
/**

src/main/java/org/apache/commons/codec/language/RefinedSoundex.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,29 +121,29 @@ public int difference(String s1, String s2) throws EncoderException {
121121
* and will throw an EncoderException if the supplied object is not of type
122122
* java.lang.String.
123123
*
124-
* @param pObject
124+
* @param obj
125125
* Object to encode
126126
* @return An object (or type java.lang.String) containing the refined
127127
* soundex code which corresponds to the String supplied.
128128
* @throws EncoderException
129129
* if the parameter supplied is not of type java.lang.String
130130
*/
131-
public Object encode(Object pObject) throws EncoderException {
132-
if (!(pObject instanceof String)) {
131+
public Object encode(Object obj) throws EncoderException {
132+
if (!(obj instanceof String)) {
133133
throw new EncoderException("Parameter supplied to RefinedSoundex encode is not of type java.lang.String");
134134
}
135-
return soundex((String) pObject);
135+
return soundex((String) obj);
136136
}
137137

138138
/**
139139
* Encodes a String using the refined soundex algorithm.
140140
*
141-
* @param pString
141+
* @param str
142142
* A String object to encode
143143
* @return A Soundex code corresponding to the String supplied
144144
*/
145-
public String encode(String pString) {
146-
return soundex(pString);
145+
public String encode(String str) {
146+
return soundex(str);
147147
}
148148

149149
/**

src/main/java/org/apache/commons/codec/language/Soundex.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public int difference(String s1, String s2) throws EncoderException {
133133
* Encodes an Object using the soundex algorithm. This method is provided in order to satisfy the requirements of
134134
* the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.
135135
*
136-
* @param pObject
136+
* @param obj
137137
* Object to encode
138138
* @return An object (or type java.lang.String) containing the soundex code which corresponds to the String
139139
* supplied.
@@ -142,24 +142,24 @@ public int difference(String s1, String s2) throws EncoderException {
142142
* @throws IllegalArgumentException
143143
* if a character is not mapped
144144
*/
145-
public Object encode(Object pObject) throws EncoderException {
146-
if (!(pObject instanceof String)) {
145+
public Object encode(Object obj) throws EncoderException {
146+
if (!(obj instanceof String)) {
147147
throw new EncoderException("Parameter supplied to Soundex encode is not of type java.lang.String");
148148
}
149-
return soundex((String) pObject);
149+
return soundex((String) obj);
150150
}
151151

152152
/**
153153
* Encodes a String using the soundex algorithm.
154154
*
155-
* @param pString
155+
* @param str
156156
* A String object to encode
157157
* @return A Soundex code corresponding to the String supplied
158158
* @throws IllegalArgumentException
159159
* if a character is not mapped
160160
*/
161-
public String encode(String pString) {
162-
return soundex(pString);
161+
public String encode(String str) {
162+
return soundex(str);
163163
}
164164

165165
/**

src/main/java/org/apache/commons/codec/net/QCodec.java

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -193,40 +193,40 @@ protected byte[] doDecoding(byte[] bytes) throws DecoderException {
193193
/**
194194
* Encodes a string into its quoted-printable form using the specified charset. Unsafe characters are escaped.
195195
*
196-
* @param pString
196+
* @param str
197197
* string to convert to quoted-printable form
198198
* @param charset
199-
* the charset for pString
199+
* the charset for str
200200
* @return quoted-printable string
201201
*
202202
* @throws EncoderException
203203
* thrown if a failure condition is encountered during the encoding process.
204204
*/
205-
public String encode(final String pString, final Charset charset) throws EncoderException {
206-
if (pString == null) {
205+
public String encode(final String str, final Charset charset) throws EncoderException {
206+
if (str == null) {
207207
return null;
208208
}
209-
return encodeText(pString, charset);
209+
return encodeText(str, charset);
210210
}
211211

212212
/**
213213
* Encodes a string into its quoted-printable form using the specified charset. Unsafe characters are escaped.
214214
*
215-
* @param pString
215+
* @param str
216216
* string to convert to quoted-printable form
217217
* @param charset
218-
* the charset for pString
218+
* the charset for str
219219
* @return quoted-printable string
220220
*
221221
* @throws EncoderException
222222
* thrown if a failure condition is encountered during the encoding process.
223223
*/
224-
public String encode(final String pString, final String charset) throws EncoderException {
225-
if (pString == null) {
224+
public String encode(final String str, final String charset) throws EncoderException {
225+
if (str == null) {
226226
return null;
227227
}
228228
try {
229-
return encodeText(pString, charset);
229+
return encodeText(str, charset);
230230
} catch (UnsupportedEncodingException e) {
231231
throw new EncoderException(e.getMessage(), e);
232232
}
@@ -235,38 +235,38 @@ public String encode(final String pString, final String charset) throws EncoderE
235235
/**
236236
* Encodes a string into its quoted-printable form using the default charset. Unsafe characters are escaped.
237237
*
238-
* @param pString
238+
* @param str
239239
* string to convert to quoted-printable form
240240
* @return quoted-printable string
241241
*
242242
* @throws EncoderException
243243
* thrown if a failure condition is encountered during the encoding process.
244244
*/
245-
public String encode(String pString) throws EncoderException {
246-
if (pString == null) {
245+
public String encode(String str) throws EncoderException {
246+
if (str == null) {
247247
return null;
248248
}
249-
return encode(pString, getCharset());
249+
return encode(str, getCharset());
250250
}
251251

252252
/**
253253
* Decodes a quoted-printable string into its original form. Escaped characters are converted back to their original
254254
* representation.
255255
*
256-
* @param pString
256+
* @param str
257257
* quoted-printable string to convert into its original form
258258
*
259259
* @return original string
260260
*
261261
* @throws DecoderException
262262
* A decoder exception is thrown if a failure condition is encountered during the decode process.
263263
*/
264-
public String decode(String pString) throws DecoderException {
265-
if (pString == null) {
264+
public String decode(String str) throws DecoderException {
265+
if (str == null) {
266266
return null;
267267
}
268268
try {
269-
return decodeText(pString);
269+
return decodeText(str);
270270
} catch (UnsupportedEncodingException e) {
271271
throw new DecoderException(e.getMessage(), e);
272272
}
@@ -275,21 +275,21 @@ public String decode(String pString) throws DecoderException {
275275
/**
276276
* Encodes an object into its quoted-printable form using the default charset. Unsafe characters are escaped.
277277
*
278-
* @param pObject
278+
* @param obj
279279
* object to convert to quoted-printable form
280280
* @return quoted-printable object
281281
*
282282
* @throws EncoderException
283283
* thrown if a failure condition is encountered during the encoding process.
284284
*/
285-
public Object encode(Object pObject) throws EncoderException {
286-
if (pObject == null) {
285+
public Object encode(Object obj) throws EncoderException {
286+
if (obj == null) {
287287
return null;
288-
} else if (pObject instanceof String) {
289-
return encode((String) pObject);
288+
} else if (obj instanceof String) {
289+
return encode((String) obj);
290290
} else {
291291
throw new EncoderException("Objects of type " +
292-
pObject.getClass().getName() +
292+
obj.getClass().getName() +
293293
" cannot be encoded using Q codec");
294294
}
295295
}
@@ -298,7 +298,7 @@ public Object encode(Object pObject) throws EncoderException {
298298
* Decodes a quoted-printable object into its original form. Escaped characters are converted back to their original
299299
* representation.
300300
*
301-
* @param pObject
301+
* @param obj
302302
* quoted-printable object to convert into its original form
303303
*
304304
* @return original object
@@ -307,14 +307,14 @@ public Object encode(Object pObject) throws EncoderException {
307307
* Thrown if the argument is not a <code>String</code>. Thrown if a failure condition is
308308
* encountered during the decode process.
309309
*/
310-
public Object decode(Object pObject) throws DecoderException {
311-
if (pObject == null) {
310+
public Object decode(Object obj) throws DecoderException {
311+
if (obj == null) {
312312
return null;
313-
} else if (pObject instanceof String) {
314-
return decode((String) pObject);
313+
} else if (obj instanceof String) {
314+
return decode((String) obj);
315315
} else {
316316
throw new DecoderException("Objects of type " +
317-
pObject.getClass().getName() +
317+
obj.getClass().getName() +
318318
" cannot be decoded using Q codec");
319319
}
320320
}

0 commit comments

Comments
 (0)