Interface | osid.locale.NumericFormattingSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session defines methods to format and parse numbers. | ||
Method | getNumericFormatType | ||
Description |
Gets the numeric format type used in this session. The numeric format type indicates the format of a number used in a culture, such as the use of a period for a decimal place. | ||
Return | osid.type.Type | the target language | |
Compliance | mandatory | This method must be implemented. | |
Method | canFormatNumbers | ||
Description |
Tests if this user can format and parse numbers. A
return of true does not guarantee successful
authorization. A return of false indicates that it is
known all methods in this session will result in a | ||
Return | boolean | false if translation methods are not authorized, true
otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | cardinalToString | ||
Description |
Gets a string representation of a cardinal. | ||
Parameters | cardinal | c | a cardinal value |
Return | string | the display string | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | cardinalsToStrings | ||
Description |
Gets a string representation of an array of cardinals. | ||
Parameters | cardinal[] | c | a cardinal value array |
Return | string[] | the display strings | |
Errors | NULL_ARGUMENT | c is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | stringToCardinal | ||
Description |
Parses a cardinal string. | ||
Parameters | string | str | a cardinal string |
Return | cardinal | the cardinal value | |
Errors | INVALID_ARGUMENT | str not of getNumericFormatType() | |
NULL_ARGUMENT | str is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | decimalToString | ||
Description |
Gets a string representation of a decimal. | ||
Parameters | decimal | d | a decimal value |
Return | string | the display string | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | decimalsToStrings | ||
Description |
Gets a string representation of an array of decimals. | ||
Parameters | decimal[] | d | a decimals value array |
Return | string[] | the display strings | |
Errors | NULL_ARGUMENT | d is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | decimalToString | ||
Description |
Parses a decimal string. | ||
Parameters | string | str | a decimal string |
Return | decimal | the decimal value | |
Errors | INVALID_ARGUMENT | str not of getNumericFormatType() | |
NULL_ARGUMENT | str is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | integerToString | ||
Description |
Gets a string representation of a integer. | ||
Parameters | integer | i | an integer value |
Return | string | the display string | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | integersToStrings | ||
Description |
Gets a string representation of an array of integers. | ||
Parameters | integer[] | i | an integer value array |
Return | string[] | the display strings | |
Errors | NULL_ARGUMENT | i is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | integerToString | ||
Description |
Parses an integer string. | ||
Parameters | string | str | an integer string |
Return | integer | the integer value | |
Errors | INVALID_ARGUMENT | str not of getNumericFormatType() | |
NULL_ARGUMENT | str is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |