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 notnull
and its scale type is notnull
as well.
If not, throw aIllegalArgumentException
, otherwise it returns the key.static void
checkIfValid(Type type)
Checks if type passed as argument is notnull
and its scale type is notnull
as well.
If not, throw aIllegalArgumentException
.static boolean
isValid(Type type)
Returnstrue
if type passed as argument is notnull
and its scale type is notnull
as well.ScaleType
scaleType()
Returns the scale type of the chart.
-
-
-
Method Detail
-
isValid
static boolean isValid(Type type)
Returnstrue
if type passed as argument is notnull
and its scale type is notnull
as well.- Parameters:
type
- type to be checked- Returns:
true
if type passed as argument is notnull
and its scale type is notnull
as well.
-
checkIfValid
static void checkIfValid(Type type)
Checks if type passed as argument is notnull
and its scale type is notnull
as 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 notnull
and its scale type is notnull
as 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.
-
-