public static UnitConverter getCachedInstance ( int pixelPerInch ) { Integer _key = new Integer ( pixelPerInch ) ; if ( ! theCache . containsKey ( _key ) ) { theCache . put ( _key , new UnitConverter ( pixelPerInch ) ) ; } return theCache . get ( _key ) ; }
Retrieve from the cache or create if not cached yet a unit converter setted for the given pixel per inch value .