Skip to content

Commit 1c905a1

Browse files
committed
Improved comment on Territory.fromString()
1 parent ec942c1 commit 1c905a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/mapcode/Territory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,9 @@ public static Territory fromTerritoryCode(final int territoryCode) {
648648
}
649649

650650
/**
651-
* Get a territory from a mapcode territory abbreviatiobn code. Note that this is NOT strictly an ISO code.
652-
* This method has been optimized to prefer to return local states, rather than countries, if the
653-
* local territory code for a state is the same as a country code.
651+
* Get a territory from a mapcode territory abbreviation. Note that the provided abbreviation is NOT an
652+
* ISO code: it's a mapcode prefix. As local mapcodes for states have been optimized to prefer to use 2-character
653+
* state codes in local codes, states are preferred over countries in this case.
654654
*
655655
* For example, fromString("AS") returns {@link Territory#IN_AS} rather than {@link Territory#ASM} and
656656
* fromString("BR") returns {@link Territory#IN_BR} rather than {@link Territory#BRA}.

0 commit comments

Comments
 (0)