private static int convertStyle(FormatStyle style){
  if (style == null) {
    return -1;
  }
  return style.ordinal();
}

private static int convertStyle ( FormatStyle style ) { if ( style == null ) { return - 1 ; } return style . ordinal ( ) ; }
converts the given formatstyle to the java . text . dateformat style .
