public static String convertToBox(String s){
  String temp=s.replaceAll("_P_","+_");
  if (temp.endsWith("_P")) {
    temp=temp.substring(0,temp.length() - 2) + "+";
  }
  temp=temp.replaceAll("_"," ");
  return WordUtils.capitalizeFully(temp);
}

public static String convertToBox ( String s ) { String temp = s . replaceAll ( "_P_" , "+_" ) ; if ( temp . endsWith ( "_P" ) ) { temp = temp . substring ( 0 , temp . length ( ) - 2 ) + "+" ; } temp = temp . replaceAll ( "_" , " " ) ; return WordUtils . capitalizeFully ( temp ) ; }
converts a given string , s , from the enumerator name to an nicely legible name . any occurrence of " _p_ " becomes a " + _ " . then , any trailing " _p " become " + " . finally , all " _ " are replaced by spaces and the string is fully capitalized .
