You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/01/05 17:24:09 UTC

[commons-text] branch master updated: Renme param.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git


The following commit(s) were added to refs/heads/master by this push:
     new 38ddfcd  Renme param.
38ddfcd is described below

commit 38ddfcd945883b82c285a3765deed9fcacbf2975
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jan 5 12:24:02 2021 -0500

    Renme param.
---
 .../commons/text/translate/CharSequenceTranslator.java   | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java b/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java
index 44e3087..7e56788 100644
--- a/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java
+++ b/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java
@@ -48,11 +48,11 @@ public abstract class CharSequenceTranslator {
      *
      * @param input CharSequence that is being translated
      * @param index int representing the current point of translation
-     * @param out Writer to translate the text to
+     * @param writer Writer to translate the text to
      * @return int count of codepoints consumed
      * @throws IOException if and only if the Writer produces an IOException
      */
-    public abstract int translate(CharSequence input, int index, Writer out) throws IOException;
+    public abstract int translate(CharSequence input, int index, Writer writer) throws IOException;
 
     /**
      * Helper for non-Writer usage.
@@ -78,28 +78,28 @@ public abstract class CharSequenceTranslator {
      * tightly coupled with the abstract method of this class.
      *
      * @param input CharSequence that is being translated
-     * @param out Writer to translate the text to
+     * @param writer Writer to translate the text to
      * @throws IOException if and only if the Writer produces an IOException
      */
-    public final void translate(final CharSequence input, final Writer out) throws IOException {
-        Validate.isTrue(out != null, "The Writer must not be null");
+    public final void translate(final CharSequence input, final Writer writer) throws IOException {
+        Validate.isTrue(writer != null, "The Writer must not be null");
         if (input == null) {
             return;
         }
         int pos = 0;
         final int len = input.length();
         while (pos < len) {
-            final int consumed = translate(input, pos, out);
+            final int consumed = translate(input, pos, writer);
             if (consumed == 0) {
                 // inlined implementation of Character.toChars(Character.codePointAt(input, pos))
                 // avoids allocating temp char arrays and duplicate checks
                 final char c1 = input.charAt(pos);
-                out.write(c1);
+                writer.write(c1);
                 pos++;
                 if (Character.isHighSurrogate(c1) && pos < len) {
                     final char c2 = input.charAt(pos);
                     if (Character.isLowSurrogate(c2)) {
-                      out.write(c2);
+                      writer.write(c2);
                       pos++;
                     }
                 }