Package org.pepstock.charba.client
Interface Type
-
- All Superinterfaces:
Key
- All Known Implementing Classes:
ChartType,ControllerType
public interface Type extends Key
Interface to map the type and scale type of a chart.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T extends Type>
TcheckAndGetIfValid(T type)Checks if type passed as argument is notnulland its scale type is notnullas well.
If not, throw aIllegalArgumentException, otherwise it returns the key.static voidcheckIfValid(Type type)Checks if type passed as argument is notnulland its scale type is notnullas well.
If not, throw aIllegalArgumentException.static booleanisValid(Type type)Returnstrueif type passed as argument is notnulland its scale type is notnullas well.ScaleTypescaleType()Returns the scale type of the chart.
-
-
-
Method Detail
-
isValid
static boolean isValid(Type type)
Returnstrueif type passed as argument is notnulland its scale type is notnullas well.- Parameters:
type- type to be checked- Returns:
trueif type passed as argument is notnulland its scale type is notnullas well.
-
checkIfValid
static void checkIfValid(Type type)
Checks if type passed as argument is notnulland its scale type is notnullas well.
If not, throw aIllegalArgumentException.- Parameters:
type- type to be checked
-
checkAndGetIfValid
static <T extends Type> T checkAndGetIfValid(T type)
Checks if type passed as argument is notnulland its scale type is notnullas well.
If not, throw aIllegalArgumentException, otherwise it returns the key.- Type Parameters:
T- type of chart type- Parameters:
type- type to be checked- Returns:
- the same key passed as argument
-
scaleType
ScaleType scaleType()
Returns the scale type of the chart.- Returns:
- the scale type of the chart.
-
-