/** * Deletes the element values with the given name from the given array of * element values, returning the new number of element values. */ private int deleteElementValue(int elementValuesCount, ElementValue[] elementValues, String elementValueMethodName) { // Find the element value. int index = findElementValue(elementValuesCount, elementValues, elementValueMethodName); if (index < 0) { return elementValuesCount; } // Shift the other element values in the array. System.arraycopy(elementValues, index + 1, elementValues, index, elementValuesCount - index - 1); // Clear the last entry in the array. elementValues[--elementValuesCount] = null; return elementValuesCount; }
/** * Deletes the element values with the given name from the given array of * element values, returning the new number of element values. */ private int deleteElementValue(int elementValuesCount, ElementValue[] elementValues, String elementValueMethodName) { // Find the element value. int index = findElementValue(elementValuesCount, elementValues, elementValueMethodName); if (index < 0) { return elementValuesCount; } // Shift the other element values in the array. System.arraycopy(elementValues, index + 1, elementValues, index, elementValuesCount - index - 1); // Clear the last entry in the array. elementValues[--elementValuesCount] = null; return elementValuesCount; }
/** * Deletes the element values with the given name from the given array of * element values, returning the new number of element values. */ private int deleteElementValue(int elementValuesCount, ElementValue[] elementValues, String elementValueMethodName) { // Find the element value. int index = findElementValue(elementValuesCount, elementValues, elementValueMethodName); if (index < 0) { return elementValuesCount; } // Shift the other element values in the array. System.arraycopy(elementValues, index + 1, elementValues, index, elementValuesCount - index - 1); // Clear the last entry in the array. elementValues[--elementValuesCount] = null; return elementValuesCount; }
/** * Deletes the element values with the given name from the given array of * element values, returning the new number of element values. */ private int deleteElementValue(int elementValuesCount, ElementValue[] elementValues, String elementValueMethodName) { // Find the element value. int index = findElementValue(elementValuesCount, elementValues, elementValueMethodName); if (index < 0) { return elementValuesCount; } // Shift the other element values in the array. System.arraycopy(elementValues, index + 1, elementValues, index, elementValuesCount - index - 1); // Clear the last entry in the array. elementValues[--elementValuesCount] = null; return elementValuesCount; }
/** * Tries put the given element value in place of an existing element value * of the same name, returning whether it was present. */ private boolean replaceElementValue(int elementValuesCount, ElementValue[] elementValues, ElementValue elementValue) { // Find the element value with the same name. int index = findElementValue(elementValuesCount, elementValues, elementValue.getMethodName(targetClass)); if (index < 0) { return false; } elementValues[index] = elementValue; return true; }
/** * Tries put the given element value in place of an existing element value * of the same name, returning whether it was present. */ private boolean replaceElementValue(int elementValuesCount, ElementValue[] elementValues, ElementValue elementValue) { // Find the element value with the same name. int index = findElementValue(elementValuesCount, elementValues, elementValue.getMethodName(targetClass)); if (index < 0) { return false; } elementValues[index] = elementValue; return true; }
/** * Tries put the given element value in place of an existing element value * of the same name, returning whether it was present. */ private boolean replaceElementValue(int elementValuesCount, ElementValue[] elementValues, ElementValue elementValue) { // Find the element value with the same name. int index = findElementValue(elementValuesCount, elementValues, elementValue.getMethodName(targetClass)); if (index < 0) { return false; } elementValues[index] = elementValue; return true; }
/** * Tries put the given element value in place of an existing element value * of the same name, returning whether it was present. */ private boolean replaceElementValue(int elementValuesCount, ElementValue[] elementValues, ElementValue elementValue) { // Find the element value with the same name. int index = findElementValue(elementValuesCount, elementValues, elementValue.getMethodName(targetClass)); if (index < 0) { return false; } elementValues[index] = elementValue; return true; }