public String verify(String value) { String result = notNullOrEmpty.verify(value); if (result != null) { return result; } if (!StringUtil.isPositiveInteger(value)) { return value + " is not a positive integer."; } return null; } }
/** * Remove a unit from the priority target list. * * @param id The ID of the unit to be removed. */ void removePriorityUnit(final String id) { if (!StringUtil.isPositiveInteger(id)) { return; } removePriorityUnit(Integer.parseInt(id)); }
/** * Add an enemy unit to the priority list. * * @param id The ID of the unit to be added. */ public void addPriorityUnit(final String id) { if (!StringUtil.isPositiveInteger(id)) { return; } addPriorityUnit(Integer.parseInt(id)); }
if (!StringUtil.isPositiveInteger(targetCoords) || (4 != targetCoords.length())) { continue;
if (hex.length() != 4 || !StringUtil.isPositiveInteger(hex)) { msg = "Invalid hex number: " + hex; princess.log(getClass(), METHOD_NAME, LogLevel.WARNING, msg + "\n" + chatEvent.getMessage()); if (!StringUtil.isPositiveInteger(id)) { msg = "Invalid unit id number: " + id; princess.log(getClass(), METHOD_NAME, LogLevel.WARNING, msg + "\n" + chatEvent.getMessage());