Interface AxisType
-
- All Superinterfaces:
Key
,PropertyKey
- All Known Implementing Classes:
ChartAxisType
public interface AxisType extends PropertyKey
Represents the scale type of a scale/axis object.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static AxisType
checkAndGet(String type)
Returns a stored axis type orIllegalArgumentException
.static <T extends AxisType>
TcheckAndGetIfValid(T type)
Checks if key passed as argument is a validAxisType
.
If not, throw aIllegalArgumentException
, otherwise it returns the key.static void
checkIfValid(AxisType type)
Checks if scale type passed as argument is notnull
and its value is notnull
as well and could be a valid scale type.
If not, throw aIllegalArgumentException
.static AxisType
create(String type, ChartAxisType baseType)
Returns a axis type by its string value and extended existing axis type.
It uses theScaleDataType
and defaultScaleId
of extended axis type.static AxisType
create(String type, ChartAxisType baseType, ScaleId defaultScaleId)
Returns a axis type by its string value, extended existing axis type and defaultScaleId
.
It uses theScaleDataType
of extended axis type.static AxisType
create(String type, ChartAxisType baseType, ScaleId defaultScaleId, ScaleDataType dataType)
Returns a axis type by all needed objects to create a axis type.AxisType
getBaseType()
Returns the base type (extended) for this axis type.ScaleDataType
getDataType()
Returns the type of managed data for this axis type.ScaleId
getDefaultScaleId()
Returns the default scale id for this axis type.static boolean
isValid(AxisType type)
Returnstrue
if scale type passed as argument is notnull
and its value is notnull
as well and could be a valid scale type.static void
register(AxisType type)
Registers the passed axis type.static void
register(AxisType type, boolean force)
Registers the passed axis type, with possibility to force the registration if already registered.
-
-
-
Method Detail
-
create
static AxisType create(String type, ChartAxisType baseType)
Returns a axis type by its string value and extended existing axis type.
It uses theScaleDataType
and defaultScaleId
of extended axis type.- Parameters:
type
- scale typebaseType
- base type (extended) for axis type- Returns:
- new scale type instance
-
create
static AxisType create(String type, ChartAxisType baseType, ScaleId defaultScaleId)
Returns a axis type by its string value, extended existing axis type and defaultScaleId
.
It uses theScaleDataType
of extended axis type.- Parameters:
type
- scale typebaseType
- base type (extended) for axis typedefaultScaleId
- default scale id for this axis type- Returns:
- new scale type instance
-
create
static AxisType create(String type, ChartAxisType baseType, ScaleId defaultScaleId, ScaleDataType dataType)
Returns a axis type by all needed objects to create a axis type.- Parameters:
type
- scale typebaseType
- base type (extended) for axis typedefaultScaleId
- default scale id for this axis typedataType
- type of data which the scale can manage- Returns:
- new scale type instance
-
register
static void register(AxisType type)
Registers the passed axis type.- Parameters:
type
- axis type
-
register
static void register(AxisType type, boolean force)
Registers the passed axis type, with possibility to force the registration if already registered.- Parameters:
type
- axis typeforce
- iftrue
, the axis type is register even if already registered.
-
checkAndGet
static AxisType checkAndGet(String type)
Returns a stored axis type orIllegalArgumentException
.- Parameters:
type
- scale type- Returns:
- a stored scale type instance
-
isValid
static boolean isValid(AxisType type)
Returnstrue
if scale type passed as argument is notnull
and its value is notnull
as well and could be a valid scale type.- Parameters:
type
- scale type to be checked- Returns:
true
if scale type passed as argument is notnull
and its value is notnull
as well and could be a valid scale type.
-
checkIfValid
static void checkIfValid(AxisType type)
Checks if scale type passed as argument is notnull
and its value is notnull
as well and could be a valid scale type.
If not, throw aIllegalArgumentException
.- Parameters:
type
- scale type to be checked
-
checkAndGetIfValid
static <T extends AxisType> T checkAndGetIfValid(T type)
Checks if key passed as argument is a validAxisType
.
If not, throw aIllegalArgumentException
, otherwise it returns the key.- Type Parameters:
T
- type of axis- Parameters:
type
- axis type to be checked- Returns:
- the same axis type passed as argument
-
getBaseType
AxisType getBaseType()
Returns the base type (extended) for this axis type.- Returns:
- the base type (extended) for this axis type
-
getDefaultScaleId
ScaleId getDefaultScaleId()
Returns the default scale id for this axis type.- Returns:
- the default scale id for this axis type
-
getDataType
ScaleDataType getDataType()
Returns the type of managed data for this axis type.- Returns:
- the type of managed data for this axis type
-
-