public interface NumericFormattingSession extends OsidSession
This session defines methods to format and parse numbers.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFormatNumbers()
Tests if this user can format and parse numbers.
|
java.lang.String[] |
cardinalsToStrings(long[] c)
Gets a string representation of an array of cardinals.
|
java.lang.String |
cardinalToString(long c)
Gets a string representation of a cardinal.
|
java.lang.String[] |
decimalsToStrings(java.math.BigDecimal[] d)
Gets a string representation of an array of decimals.
|
java.lang.String |
decimalToString(java.math.BigDecimal d)
Gets a string representation of a decimal.
|
java.math.BigDecimal |
decimalToString(java.lang.String str)
Parses a decimal string.
|
Type |
getNumericFormatType()
Gets the numeric format type used in this session.
|
java.lang.String[] |
integersToStrings(long[] i)
Gets a string representation of an array of integers.
|
java.lang.String |
integerToString(long i)
Gets a string representation of a integer.
|
long |
integerToString(java.lang.String str)
Parses an integer string.
|
long |
stringToCardinal(java.lang.String str)
Parses a cardinal string.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseType getNumericFormatType()
mandatory - This method must be implemented. boolean canFormatNumbers()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer lookup operations. false if translation methods are not
authorized, true otherwisemandatory - This method must be implemented. java.lang.String cardinalToString(long c)
throws OperationFailedException,
PermissionDeniedException
c - a cardinal valueOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. java.lang.String[] cardinalsToStrings(long[] c)
throws OperationFailedException,
PermissionDeniedException
c - a cardinal value arrayNullArgumentException - c is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. long stringToCardinal(java.lang.String str)
throws OperationFailedException,
PermissionDeniedException
str - a cardinal stringInvalidArgumentException - str not of
getNumericFormatType() NullArgumentException - str is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. java.lang.String decimalToString(java.math.BigDecimal d)
throws OperationFailedException,
PermissionDeniedException
d - a decimal valueOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. java.lang.String[] decimalsToStrings(java.math.BigDecimal[] d)
throws OperationFailedException,
PermissionDeniedException
d - a decimals value arrayNullArgumentException - d is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. java.math.BigDecimal decimalToString(java.lang.String str)
throws OperationFailedException,
PermissionDeniedException
str - a decimal stringInvalidArgumentException - str not of
getNumericFormatType() NullArgumentException - str is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. java.lang.String integerToString(long i)
throws OperationFailedException,
PermissionDeniedException
i - an integer valueOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. java.lang.String[] integersToStrings(long[] i)
throws OperationFailedException,
PermissionDeniedException
i - an integer value arrayNullArgumentException - i is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. long integerToString(java.lang.String str)
throws OperationFailedException,
PermissionDeniedException
str - an integer stringInvalidArgumentException - str not of
getNumericFormatType() NullArgumentException - str is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.