Lines Matching defs:value
147 * Checks that value is present as at least one of the elements of the array.
149 * @param value the value to check for
150 * @return true if the value is present in the array
152 public static <T> boolean contains(T[] array, T value) {
153 return indexOf(array, value) != -1;
157 * Return first index of {@code value} in {@code array}, or {@code -1} if
160 public static <T> int indexOf(T[] array, T value) {
163 if (Objects.equals(array[i], value)) return i;
181 public static boolean contains(int[] array, int value) {
184 if (element == value) {
191 public static boolean contains(long[] array, long value) {
194 if (element == value) {
203 for (long value : array) {
204 total += value;
210 * Adds value to given array if not already present, providing set-like
231 * Removes value from given array if present, providing set-like behavior.
254 * Adds value to given array if not already present, providing set-like
274 * Removes value from given array if present, providing set-like behavior.
297 * Removes value from given array if present, providing set-like behavior.
320 * Adds value to given array if not already present, providing set-like
340 * Removes value from given array if present, providing set-like behavior.