/** * For a string containing a percentage delta as judged by <code>isPercentageDelta()</code>, return the numerical value, * rounded to an integer. * * @return the numeric part of the percentage, rounded to an integer, or 0 if the string is not a valid percentage delta. */ private int getPercentageDelta(String string) { String s = string.trim(); if (!isPercentageDelta(s)) return 0; return getNumberDelta(s.substring(0, s.length() - 1)); }
/** * For a string containing a percentage delta as judged by <code>isPercentageDelta()</code>, return the numerical value, * rounded to an integer. * * @return the numeric part of the percentage, rounded to an integer, or 0 if the string is not a valid percentage delta. */ private int getPercentageDelta(String string) { String s = string.trim(); if (!isPercentageDelta(s)) return 0; return getNumberDelta(s.substring(0, s.length() - 1)); }
if (sVolume.equals("")) { settings.setVolume(parentSettings.volume()); } else if (isPercentageDelta(sVolume)) { int newVolume = parentSettings.volume() + getPercentageDelta(sVolume); if (newVolume < 0)
if (sVolume.equals("")) { settings.setVolume(parentSettings.volume()); } else if (isPercentageDelta(sVolume)) { int newVolume = parentSettings.volume() + getPercentageDelta(sVolume); if (newVolume < 0)
/** * For a string containing a percentage delta as judged by <code>isPercentageDelta()</code>, return the numerical value, * rounded to an integer. * * @return the numeric part of the percentage, rounded to an integer, or 0 if the string is not a valid percentage delta. */ private int getPercentageDelta(String string) { String s = string.trim(); if (!isPercentageDelta(s)) return 0; return getNumberDelta(s.substring(0, s.length() - 1)); }
if (sVolume.equals("")) { settings.setVolume(parentSettings.volume()); } else if (isPercentageDelta(sVolume)) { int newVolume = parentSettings.volume() + getPercentageDelta(sVolume); if (newVolume < 0)