src/java.base/share/classes/java/lang/StringConcatHelper.java
changeset 52177 430e6421d503
parent 48373 f9152f462cbc
child 52326 77018c2b97df
equal deleted inserted replaced
52176:cba34f27d9ce 52177:430e6421d503
   134      * @param value   value to mix in
   134      * @param value   value to mix in
   135      * @return new coder
   135      * @return new coder
   136      */
   136      */
   137     static byte mixCoder(byte current, String value) {
   137     static byte mixCoder(byte current, String value) {
   138         return (byte)(current | value.coder());
   138         return (byte)(current | value.coder());
   139     }
       
   140 
       
   141     /**
       
   142      * Mix coder into current coder
       
   143      * @param current current coder
       
   144      * @param value   value to mix in
       
   145      * @return new coder
       
   146      */
       
   147     static byte mixCoder(byte current, boolean value) {
       
   148         // Booleans are represented with Latin1
       
   149         return current;
       
   150     }
       
   151 
       
   152     /**
       
   153      * Mix coder into current coder
       
   154      * @param current current coder
       
   155      * @param value   value to mix in
       
   156      * @return new coder
       
   157      */
       
   158     static byte mixCoder(byte current, byte value) {
       
   159         // Bytes are represented with Latin1
       
   160         return current;
       
   161     }
       
   162 
       
   163     /**
       
   164      * Mix coder into current coder
       
   165      * @param current current coder
       
   166      * @param value   value to mix in
       
   167      * @return new coder
       
   168      */
       
   169     static byte mixCoder(byte current, short value) {
       
   170         // Shorts are represented with Latin1
       
   171         return current;
       
   172     }
       
   173 
       
   174     /**
       
   175      * Mix coder into current coder
       
   176      * @param current current coder
       
   177      * @param value   value to mix in
       
   178      * @return new coder
       
   179      */
       
   180     static byte mixCoder(byte current, int value) {
       
   181         // Ints are represented with Latin1
       
   182         return current;
       
   183     }
       
   184 
       
   185     /**
       
   186      * Mix coder into current coder
       
   187      * @param current current coder
       
   188      * @param value   value to mix in
       
   189      * @return new coder
       
   190      */
       
   191     static byte mixCoder(byte current, long value) {
       
   192         // Longs are represented with Latin1
       
   193         return current;
       
   194     }
   139     }
   195 
   140 
   196     /**
   141     /**
   197      * Prepends the stringly representation of boolean value into buffer,
   142      * Prepends the stringly representation of boolean value into buffer,
   198      * given the coder and final index. Index is measured in chars, not in bytes!
   143      * given the coder and final index. Index is measured in chars, not in bytes!