Interface IAbsoluteOrRelativeInt
- All Superinterfaces:
IElement
- All Known Implementing Classes:
AbsoluteOrRelativeInt
A
IAbsoluteOrRelativeInt stores either an integer or a percentage.- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionintdoubleintgetValueRelativeToHundredPercentValue(int hundredPercentValue) booleanbooleanbooleanMethods inherited from interface IElement
getAttributes, getSpecification, toFormatedString, toXml
-
Method Details
-
getAbsoluteValue
int getAbsoluteValue()- Returns:
- the absolute value of the current
IAbsoluteOrRelativeInt. - Throws:
RuntimeException- if the currentIAbsoluteOrRelativeIntis not absolute.
-
getPercentage
double getPercentage()- Returns:
- the percentage of the current
IAbsoluteOrRelativeInt. - Throws:
RuntimeException- if the currentIAbsoluteOrRelativeIntis not relative.
-
getValueRelativeToHundredPercentValue
int getValueRelativeToHundredPercentValue(int hundredPercentValue) - Parameters:
hundredPercentValue-- Returns:
- the value of the current
IAbsoluteOrRelativeIntrelative to the given hundredPercentValue.
-
isAbsolute
boolean isAbsolute()- Returns:
- true if the current
IAbsoluteOrRelativeIntis absolute, false otherwise.
-
isPositive
boolean isPositive()- Returns:
- true if the current
IAbsoluteOrRelativeIntis positive, false otherwise.
-
isRelative
boolean isRelative()- Returns:
- true if the current
IAbsoluteOrRelativeIntis relative, false otherwise.
-