Lines Matching full:code
37 * Static utility methods pertaining to {@code int} primitives, that are not
48 * The number of bytes required to represent a primitive {@code int}
54 * Returns a hash code for {@code value}; equal to the result of invoking
55 * {@code ((Integer) value).hashCode()}.
57 * @param value a primitive {@code int} value
58 * @return a hash code for the value
65 * Returns the {@code int} value that is equal to {@code value}, if possible.
67 * @param value any value in the range of the {@code int} type
68 * @return the {@code int} value that equals {@code value}
69 * @throws IllegalArgumentException if {@code value} is greater than {@link
79 * Returns the {@code int} nearest in value to {@code value}.
81 * @param value any {@code long} value
82 * @return the same value cast to {@code int} if it is in the range of the
83 * {@code int} type, {@link Integer#MAX_VALUE} if it is too large,
97 * Compares the two specified {@code int} values. The sign of the value
98 * returned is the same as that of {@code ((Integer) a).compareTo(b)}.
100 * @param a the first {@code int} to compare
101 * @param b the second {@code int} 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 int} values, possibly empty
114 * @param target a primitive {@code int} 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 int} values, possibly empty
132 * @param target a primitive {@code int} 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 int} values, possibly empty
186 * @param target a primitive {@code int} 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 int} 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 int} 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 int[] {a, b}, new int[] {}, new
246 * int[] {c}} returns the array {@code {a, b, c}}.
248 * @param arrays zero or more {@code int} arrays
267 * Returns a big-endian representation of {@code value} in a 4-element byte
268 * array; equivalent to {@code ByteBuffer.allocate(4).putInt(value).array()}.
269 * For example, the input value {@code 0x12131415} would yield the byte array
270 * {@code {0x12, 0x13, 0x14, 0x15}}.
289 * Returns the {@code int} value whose big-endian representation is stored in
290 * the first 4 bytes of {@code bytes}; equivalent to {@code
291 * ByteBuffer.wrap(bytes).getInt()}. For example, the input byte array {@code
292 * {0x12, 0x13, 0x14, 0x15, 0x33}} would yield the {@code int} value {@code
300 * @throws IllegalArgumentException if {@code bytes} has fewer than 4 elements
313 * Returns an array containing the same values as {@code array}, but
314 * guaranteed to be of a specified minimum length. If {@code array} already
315 * has a length of at least {@code minLength}, it is returned directly.
316 * Otherwise, a new array of size {@code minLength + padding} is returned,
317 * containing the values of {@code array}, and zeroes in the remaining places.
323 * @throws IllegalArgumentException if {@code minLength} or {@code padding} is
325 * @return an array containing the values of {@code array}, with guaranteed
326 * minimum length {@code minLength}
345 * Returns a string containing the supplied {@code int} values separated
346 * by {@code separator}. For example, {@code join("-", 1, 2, 3)} returns
347 * the string {@code "1-2-3"}.
351 * @param array an array of {@code int} values, possibly empty
369 * Returns a comparator that compares two {@code int} arrays
373 * shorter array as the lesser. For example, {@code [] < [1] < [1, 2] < [2]}.
403 * Copies a collection of {@code Integer} instances into a new array of
404 * primitive {@code int} values.
406 * <p>Elements are copied from the argument collection as if by {@code
410 * @param collection a collection of {@code Integer} objects
411 * @return an array containing the same values as {@code collection}, in the
413 * @throws NullPointerException if {@code collection} or any of its elements
433 * but any attempt to set a value to {@code null} will result in a {@link
437 * {@code Integer} objects written to or read from it. For example, whether
438 * {@code list.get(0) == list.get(0)} is true for the returned list is