private static void validateFieldName(String fieldName){
  if (fieldName == null) {
    throw new NullPointerException("fieldName is null");
  }
  if (fieldName.length() == 0) {
    throw new IllegalArgumentException("fieldName is empty");
  }
}

private static void validateFieldName ( String fieldName ) { if ( fieldName == null ) { throw new NullPointerException ( "fieldName is null" ) ; } if ( fieldName . length ( ) == 0 ) { throw new IllegalArgumentException ( "fieldName is empty" ) ; } }
ensures that a given field name is valid . used as a helper for methods that have that precondition .
