public static Region getInstance ( String id ) { if ( id == null ) { throw new NullPointerException ( ) ; } loadRegionData ( ) ; Region r = regionIDMap . get ( id ) ; if ( r == null ) { r = regionAliases . get ( id ) ; } if ( r == null ) { throw new IllegalArgumentException ( "Unknown region id: " + id ) ; } if ( r . type == RegionType . DEPRECATED && r . preferredValues . size ( ) == 1 ) { r = r . preferredValues . get ( 0 ) ; } return r ; }
Returns a Region using the given region ID . The region ID can be either a 2 - letter ISO code 3 - letter ISO code UNM . 49 numeric code or other valid Unicode Region Code as defined by the CLDR .