public static String computeName(String firstName, String middleName, String lastName) {
    String name="";
    String separator = "";
    if (firstName!=null&&!firstName.isEmpty()) {
      name+=firstName;
      separator=" ";
    }
    if (middleName!=null&&!middleName.isEmpty()) {
      name+=separator+middleName;
      separator=" ";
    }
    if (lastName!=null&&!lastName.isEmpty()) {
      name+=separator+lastName;
      separator=" ";
    }
    return name;
  }