Following are the CounterException and APIs:
- CounterException
Table 1. CounterExceptionException |
Thrown when |
CounterException |
- set the value of a element over the Max Limit.
- set the value of a element under the Min Limit.
- set the MaxLimit of a element under the current value.
- set the MinLimit of a element over the current value.
- set a negative value to element of a counter, includes value,
MaxLimit and MinLimit.
- set a non-integer value to totIncrs.
- set a non-integer value to totIncrs max limit.
- set a non-integer value to totIncrs min limit.
|
- currentTotal: Retrieves the total element’s value.
Table 2. ReturnType |
Description |
float |
total element’s value |
- setTotal: Sets value of the total element.
Table 3. ParametersName |
Type |
Description |
totalValue |
float |
New total element value |
Table 4. Return Type |
Description |
void |
|
- increase: Sets the increase value.
Detailed Description:
- Checks if the value to be set is correct (between minLimit and maxLimit,
non-negative).
- The increase value is correct if it is between its limits, and the new
total (total+ value) and TotIncrs (TotIncrs+1) are correct as well.
Table 5. ParametersName |
Type |
Description |
incrValue |
float |
New increment element value |
Table 6. Return Type |
Description |
void |
|
- setIncreaseTimes: Sets the value to totIncrs.
Detailed
Description:
- Tests if the value is correct.
- If the value is correct, it sets it.
Table 7. ParametersName |
Type |
Description |
totalCount |
float |
New totIncrs value |
Table 8. Return Type |
Description |
void |
|
- increaeTimes: Returns the totIncrs value.
Table 9. Return Type |
Description |
float |
The value of totIncrs. |