static ProtocolVersion valueOf(String name){
  if (name == null) {
    throw new IllegalArgumentException("Protocol cannot be null");
  }
  if (FIPS && (name.equals(SSL30.name) || name.equals(SSL20Hello.name))) {
    throw new IllegalArgumentException("Only TLS 1.0 or later allowed in FIPS mode");
  }
  if (name.equals(SSL30.name)) {
    return SSL30;
  }
 else   if (name.equals(TLS10.name)) {
    return TLS10;
  }
 else   if (name.equals(TLS11.name)) {
    return TLS11;
  }
 else   if (name.equals(TLS12.name)) {
    return TLS12;
  }
 else   if (name.equals(SSL20Hello.name)) {
    return SSL20Hello;
  }
 else {
    throw new IllegalArgumentException(name);
  }
}

static ProtocolVersion valueOf ( String name ) { if ( name == null ) { throw new IllegalArgumentException ( "Protocol cannot be null" ) ; } if ( FIPS && ( name . equals ( SSL30 . name ) || name . equals ( SSL20Hello . name ) ) ) { throw new IllegalArgumentException ( "Only TLS 1.0 or later allowed in FIPS mode" ) ; } if ( name . equals ( SSL30 . name ) ) { return SSL30 ; } else if ( name . equals ( TLS10 . name ) ) { return TLS10 ; } else if ( name . equals ( TLS11 . name ) ) { return TLS11 ; } else if ( name . equals ( TLS12 . name ) ) { return TLS12 ; } else if ( name . equals ( SSL20Hello . name ) ) { return SSL20Hello ; } else { throw new IllegalArgumentException ( name ) ; } }
return a protocolversion for the given name .
