code: private boolean isValidCharacters(final String component, final char padding) {
  		// Check the component is either all padding chars or all digit chars
  		boolean paddingChars = false;
  		boolean digitChars = false;
  		for (int i = 0; i < component.length(); i++) {
  			char chr = component.charAt(i);
  			// Padding
  			if (chr == padding) {
  				if (digitChars) {
  					return false;
  				}
  				paddingChars = true;
  			} else if (chr >= '0' && chr <= '9') {  // Digit
  				if (paddingChars) {
  					return false;
  				}
  				digitChars = true;
  			} else {
  				return false;
  			}
  		}
  
  		return true;
  	}
docs: Check the component is either all padding chars or all digit chars.
  
  @param component the date component.
  @param padding the padding character.
  @return true if the component is valid, otherwise false