public IntStringTranslator(String[] strings){
  list=new ArrayList<String>(Arrays.asList(strings));
  map=new HashMap<String,Integer>();
  for (int i=0; i < strings.length; i++) {
    map.put(strings[i],i);
  }
}

public IntStringTranslator ( String [ ] strings ) { list = new ArrayList < String > ( Arrays . asList ( strings ) ) ; map = new HashMap < String , Integer > ( ) ; for ( int i = 0 ; i < strings . length ; i ++ ) { map . put ( strings [ i ] , i ) ; } }
initialize a int - string two - way translator , setting int values according to the position of strings in the array .
