Lines Matching full:code
37 * Static utility methods pertaining to {@code char} primitives, that are not
48 * The number of bytes required to represent a primitive {@code char}
54 * Returns a hash code for {@code value}; equal to the result of invoking
55 * {@code ((Character) value).hashCode()}.
57 * @param value a primitive {@code char} value
58 * @return a hash code for the value
65 * Returns the {@code char} value that is equal to {@code value}, if possible.
67 * @param value any value in the range of the {@code char} type
68 * @return the {@code char} value that equals {@code value}
69 * @throws IllegalArgumentException if {@code value} is greater than {@link
79 * Returns the {@code char} nearest in value to {@code value}.
81 * @param value any {@code long} value
82 * @return the same value cast to {@code char} if it is in the range of the
83 * {@code char} type, {@link Character#MAX_VALUE} if it is too large,
97 * Compares the two specified {@code char} values. The sign of the value
98 * returned is the same as that of {@code ((Character) a).compareTo(b)}.
100 * @param a the first {@code char} to compare
101 * @param b the second {@code char} to compare
102 * @return a negative value if {@code a} is less than {@code b}; a positive
103 * value if {@code a} is greater than {@code b}; or zero if they are equal
110 * Returns {@code true} if {@code target} is present as an element anywhere in
111 * {@code array}.
113 * @param array an array of {@code char} values, possibly empty
114 * @param target a primitive {@code char} value
115 * @return {@code true} if {@code array[i] == target} for some value of {@code
128 * Returns the index of the first appearance of the value {@code target} in
129 * {@code array}.
131 * @param array an array of {@code char} values, possibly empty
132 * @param target a primitive {@code char} value
133 * @return the least index {@code i} for which {@code array[i] == target}, or
134 * {@code -1} if no such index exists.
152 * Returns the start position of the first occurrence of the specified {@code
153 * target} within {@code array}, or {@code -1} if there is no such occurrence.
155 * <p>More formally, returns the lowest index {@code i} such that {@code
157 * the same elements as {@code target}.
159 * @param array the array to search for the sequence {@code target}
160 * @param target the array to search for as a sub-sequence of {@code array}
182 * Returns the index of the last appearance of the value {@code target} in
183 * {@code array}.
185 * @param array an array of {@code char} values, possibly empty
186 * @param target a primitive {@code char} value
187 * @return the greatest index {@code i} for which {@code array[i] == target},
188 * or {@code -1} if no such index exists.
206 * Returns the least value present in {@code array}.
208 * @param array a <i>nonempty</i> array of {@code char} values
209 * @return the value present in {@code array} that is less than or equal to
211 * @throws IllegalArgumentException if {@code array} is empty
225 * Returns the greatest value present in {@code array}.
227 * @param array a <i>nonempty</i> array of {@code char} values
228 * @return the value present in {@code array} that is greater than or equal to
230 * @throws IllegalArgumentException if {@code array} is empty
245 * For example, {@code concat(new char[] {a, b}, new char[] {}, new
246 * char[] {c}} returns the array {@code {a, b, c}}.
248 * @param arrays zero or more {@code char} arrays
267 * Returns a big-endian representation of {@code value} in a 2-element byte
268 * array; equivalent to {@code
270 * value {@code '\\u5432'} would yield the byte array {@code {0x54, 0x32}}.
285 * Returns the {@code char} value whose big-endian representation is
286 * stored in the first 2 bytes of {@code bytes}; equivalent to {@code
288 * {@code {0x54, 0x32}} would yield the {@code char} value {@code '\\u5432'}.
293 * @throws IllegalArgumentException if {@code bytes} has fewer than 2
304 * Returns an array containing the same values as {@code array}, but
305 * guaranteed to be of a specified minimum length. If {@code array} already
306 * has a length of at least {@code minLength}, it is returned directly.
307 * Otherwise, a new array of size {@code minLength + padding} is returned,
308 * containing the values of {@code array}, and zeroes in the remaining places.
314 * @throws IllegalArgumentException if {@code minLength} or {@code padding} is
316 * @return an array containing the values of {@code array}, with guaranteed
317 * minimum length {@code minLength}
336 * Returns a string containing the supplied {@code char} values separated
337 * by {@code separator}. For example, {@code join("-", '1', '2', '3')} returns
338 * the string {@code "1-2-3"}.
342 * @param array an array of {@code char} values, possibly empty
361 * Returns a comparator that compares two {@code char} arrays
366 * {@code [] < ['a'] < ['a', 'b'] < ['b']}.
396 * Copies a collection of {@code Character} instances into a new array of
397 * primitive {@code char} values.
399 * <p>Elements are copied from the argument collection as if by {@code
403 * @param collection a collection of {@code Character} objects
404 * @return an array containing the same values as {@code collection}, in the
406 * @throws NullPointerException if {@code collection} or any of its elements
426 * but any attempt to set a value to {@code null} will result in a {@link
430 * {@code Character} objects written to or read from it. For example, whether
431 * {@code list.get(0) == list.get(0)} is true for the returned list is