public RtfCtrlWordHandler getCtrlWordHandler ( String ctrlWord ) { try { if ( ctrlWords . containsKey ( ctrlWord ) ) { // add 1 to known control words return ( RtfCtrlWordHandler ) ctrlWords . get ( ctrlWord ) ; } else { // add 1 to unknown control words return ( RtfCtrlWordHandler ) ctrlWords . get ( "unknown" ) ; } } catch ( SecurityException e ) { // TODO Auto-generated catch block e . printStackTrace ( ) ; } catch ( IllegalArgumentException e ) { // TODO Auto-generated catch block e . printStackTrace ( ) ; } return null ; }
Get the HashMap object containing the control words . Initializes the instance if this is the first instantiation of RtfCtrlWords class .