jdk/src/share/classes/java/util/StringJoiner.java
changeset 21965 a7e08a4d1e02
parent 19214 e5901820c3c1
child 25967 0060a996fe1c
equal deleted inserted replaced
21964:73a3fd499f24 21965:a7e08a4d1e02
   129     }
   129     }
   130 
   130 
   131     /**
   131     /**
   132      * Sets the sequence of characters to be used when determining the string
   132      * Sets the sequence of characters to be used when determining the string
   133      * representation of this {@code StringJoiner} and no elements have been
   133      * representation of this {@code StringJoiner} and no elements have been
   134      * added yet, i.e. when it is empty.  A copy of the {@code emptyValue}
   134      * added yet, that is, when it is empty.  A copy of the {@code emptyValue}
   135      * parameter is made for this purpose. Note that once an add method has been
   135      * parameter is made for this purpose. Note that once an add method has been
   136      * called, the {@code StringJoiner} is no longer considered empty, even if
   136      * called, the {@code StringJoiner} is no longer considered empty, even if
   137      * the element(s) added correspond to the empty {@code String}.
   137      * the element(s) added correspond to the empty {@code String}.
   138      *
   138      *
   139      * @param  emptyValue the characters to return as the value of an empty
   139      * @param  emptyValue the characters to return as the value of an empty
   226         }
   226         }
   227         return value;
   227         return value;
   228     }
   228     }
   229 
   229 
   230     /**
   230     /**
   231      * The length of the {@code StringJoiner} value, i.e. the length of
   231      * Returns the length of the {@code String} representation
   232      * {@code String} representation of the {@code StringJoiner}. Note that if
   232      * of this {@code StringJoiner}. Note that if
   233      * no add methods have been called, then the length of the {@code String}
   233      * no add methods have been called, then the length of the {@code String}
   234      * representation (either {@code prefix + suffix} or {@code emptyValue})
   234      * representation (either {@code prefix + suffix} or {@code emptyValue})
   235      * will be returned. The value should be equivalent to
   235      * will be returned. The value should be equivalent to
   236      * {@code toString().length()}.
   236      * {@code toString().length()}.
   237      *
   237      *