[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

HasCountryCode

mixes in with Object

HasCountryCode



Operations

Get list of all operations

CountryCodeDigits
DisplayCountryCode
MakeValidCountryCode


Attributes

Get list of all attributes

CountryCode


Fields

No fields are defined by HasCountryCode or any of its superclasses.


Instance template

Class HasCountryCode cannot be instantiated.


Class definition

Define Class HasCountryCode;
    mixes in with Object;
    
    attribute CountryCode: Text, readOnly, noGetter;
        // Returns a human-readable country code like '+81' or '+33'
        // must override to return this text from where it is stored

    operation DisplayCountryCode(): Text;
        // returns the country code without the ISO3166 code (if it was present)
        // for 'CA+1', returns '+1'

    intrinsic CountryCodeDigits(countryCode: HasText): Text;
        // Returns just the digits portion of a countryCode.  For '+81', returns
        // '81'.  For 'CA+1', returns '1'.

    intrinsic MakeValidCountryCode(countryCode: HasText): Text;
        // Returns a valid country code text object from a possibly ill-formed
        // country code.  A valid country code is either '+81' ("+" and country
        // code) or 'CA+1' (ISO3166 code "+" country code).
        // MakeValidCountryCode will parse countryCode and add the '+' if it's
        // missing.  Returns nilObject if countryCode is invalid.

end class;