private void validateAddParams(T source,String sourceID,T target,Position p){
  if (source == null || sourceID == null || sourceID.length() < 1 || target == null || p == null) {
    String message=null;
    if (source == null) {
      message="Attempt to add a null source object";
    }
 else     if (sourceID == null) {
      message="Attempt to assign an invalid id to added source " + source + ",  sourceID = "+ sourceID;
    }
 else     if (target == null) {
      message="Attempt to add a source object to an invalid target";
    }
 else     if (p == null) {
      message="Attempt to add a source object to an invalid target location p = " + p;
    }
    throw new IllegalArgumentException(message);
  }
}

private void validateAddParams ( T source , String sourceID , T target , Position p ) { if ( source == null || sourceID == null || sourceID . length ( ) < 1 || target == null || p == null ) { String message = null ; if ( source == null ) { message = "Attempt to add a null source object" ; } else if ( sourceID == null ) { message = "Attempt to assign an invalid id to added source " + source + ",  sourceID = " + sourceID ; } else if ( target == null ) { message = "Attempt to add a source object to an invalid target" ; } else if ( p == null ) { message = "Attempt to add a source object to an invalid target location p = " + p ; } throw new IllegalArgumentException ( message ) ; } }
called to validate add params .
