name
name: (WorldRegion) -> stringThe constant's name as declared.
WorldRegion.valueOf(…)
WorldRegion.UNITED_STATES_OF_AMERICA
WorldRegion.UNITED_KINGDOM| Method | Returns | Description |
|---|---|---|
name() | string | The constant's name as declared. |
ordinal() | number | The constant's 0-based position in values(). |
toString() | string | name(); tostring(c) answers the same. |
compareTo(WorldRegion) | number | This ordinal less other's. |
equals(any) | boolean | Whether other is this constant. == answers the same. |
getAlpha2() | string | This constant's getAlpha2() value, listed on each constant. |
getAlpha3() | string | This constant's getAlpha3() value, listed on each constant. |
getId() | number | This 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) | WorldRegion | valueOf(name): the constant named name; any other name is an error. |
| Field | Type | Description |
|---|---|---|
UNITED_STATES_OF_AMERICA | WorldRegion | UNITED_STATES_OF_AMERICA: ordinal 0; getAlpha2() "US", getAlpha3() "USA", getId() 0. |
UNITED_KINGDOM | WorldRegion | UNITED_KINGDOM: ordinal 1; getAlpha2() "GB", getAlpha3() "GBR", getId() 1. |
AUSTRALIA | WorldRegion | AUSTRALIA: ordinal 2; getAlpha2() "AU", getAlpha3() "AUS", getId() 3. |
GERMANY | WorldRegion | GERMANY: ordinal 3; getAlpha2() "DE", getAlpha3() "DEU", getId() 7. |
BRAZIL | WorldRegion | BRAZIL: ordinal 4; getAlpha2() "BR", getAlpha3() "BRA", getId() 8. |
JAPAN | WorldRegion | JAPAN: ordinal 5; getAlpha2() "JP", getAlpha3() "JPN", getId() 9. |
SINGAPORE | WorldRegion | SINGAPORE: ordinal 6; getAlpha2() "SG", getAlpha3() "SGP", getId() 10. |
SOUTH_AFRICA | WorldRegion | SOUTH_AFRICA: ordinal 7; getAlpha2() "ZA", getAlpha3() "ZAF", getId() 12. |
| Method | Returns | Description |
|---|---|---|
HttpWorld.getRegion | WorldRegion? | WorldRegion.valueOf(location): the region, nil for an unknown location. |
WorldRegionClass.valueOf | WorldRegion | valueOf(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. |
namename: (WorldRegion) -> stringThe constant's name as declared.
ordinalordinal: (WorldRegion) -> numberThe constant's 0-based position in values().
toStringtoString: (WorldRegion) -> stringname(); tostring(c) answers the same.
compareTocompareTo: (WorldRegion, WorldRegion) -> numberThis ordinal less other's.
equalsequals: (WorldRegion, any) -> booleanWhether other is this constant. == answers the same.
getAlpha2getAlpha2: (WorldRegion) -> stringThis constant's getAlpha2() value, listed on each constant.
getAlpha3getAlpha3: (WorldRegion) -> stringThis constant's getAlpha3() value, listed on each constant.
getIdgetId: (WorldRegion) -> numberThis constant's getId() value, listed on each constant.
valuesvalues: () -> {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.
valueOfvalueOf: (string) -> WorldRegionvalueOf(name): the constant named name; any other name is an error.