WorldRegion

Methods
10
Fields
8

Getting one

WorldRegion.valueOf(…)
WorldRegion.UNITED_STATES_OF_AMERICA
WorldRegion.UNITED_KINGDOM

Methods

MethodReturnsDescription
name()stringThe constant's name as declared.
ordinal()numberThe constant's 0-based position in values().
toString()stringname(); tostring(c) answers the same.
compareTo(WorldRegion)numberThis ordinal less other's.
equals(any)booleanWhether other is this constant. == answers the same.
getAlpha2()stringThis constant's getAlpha2() value, listed on each constant.
getAlpha3()stringThis constant's getAlpha3() value, listed on each constant.
getId()numberThis constant's getId() value, listed on each constant.
values(){WorldRegion}Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it.
valueOf(string)WorldRegionvalueOf(name): the constant named name; any other name is an error.

Fields

FieldTypeDescription
UNITED_STATES_OF_AMERICAWorldRegionUNITED_STATES_OF_AMERICA: ordinal 0; getAlpha2() "US", getAlpha3() "USA", getId() 0.
UNITED_KINGDOMWorldRegionUNITED_KINGDOM: ordinal 1; getAlpha2() "GB", getAlpha3() "GBR", getId() 1.
AUSTRALIAWorldRegionAUSTRALIA: ordinal 2; getAlpha2() "AU", getAlpha3() "AUS", getId() 3.
GERMANYWorldRegionGERMANY: ordinal 3; getAlpha2() "DE", getAlpha3() "DEU", getId() 7.
BRAZILWorldRegionBRAZIL: ordinal 4; getAlpha2() "BR", getAlpha3() "BRA", getId() 8.
JAPANWorldRegionJAPAN: ordinal 5; getAlpha2() "JP", getAlpha3() "JPN", getId() 9.
SINGAPOREWorldRegionSINGAPORE: ordinal 6; getAlpha2() "SG", getAlpha3() "SGP", getId() 10.
SOUTH_AFRICAWorldRegionSOUTH_AFRICA: ordinal 7; getAlpha2() "ZA", getAlpha3() "ZAF", getId() 12.

Returned by

MethodReturnsDescription
HttpWorld.getRegionWorldRegion?WorldRegion.valueOf(location): the region, nil for an unknown location.
WorldRegionClass.valueOfWorldRegionvalueOf(name): the constant named name; any other name is an error.
WorldRegionClass.values{WorldRegion}Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it.

Method details

equals

equals: (WorldRegion, any) -> boolean

Whether other is this constant. == answers the same.

getAlpha2

getAlpha2: (WorldRegion) -> string

This constant's getAlpha2() value, listed on each constant.

getAlpha3

getAlpha3: (WorldRegion) -> string

This constant's getAlpha3() value, listed on each constant.

getId

getId: (WorldRegion) -> number

This constant's getId() value, listed on each constant.

values

values: () -> {WorldRegion}

Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it.

valueOf

valueOf: (string) -> WorldRegion

valueOf(name): the constant named name; any other name is an error.