Interface ScaleId
-
- All Superinterfaces:
Key
,PropertyKey
- All Known Implementing Classes:
DefaultScaleId
public interface ScaleId extends PropertyKey
Represents the scale id 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 ScaleId
checkAndGetScaleID(String id, ScaleId defaultValue)
Returns the ID of the scale checking the default ones,DefaultScaleId
.static void
checkIfValid(String id)
Checks if scale id passed as argument is notnull
and its value is notnull
as well and could be a valid scale id.
If not, throw aIllegalArgumentException
.static void
checkIfValid(ScaleId id)
Checks if scale id passed as argument is notnull
and its value is notnull
as well and could be a valid scale id.
If not, throw aIllegalArgumentException
.static ScaleId
create(String id)
Returns a key instance by its string value.AxisKind
getAxisKind()
Returns the default axis kind for this default scale id.static boolean
isValid(String id)
Returnstrue
if scale id passed as argument is notnull
and its value could be a valid scale id.static boolean
isValid(ScaleId id)
Returnstrue
if scale id passed as argument is notnull
and its value is notnull
as well and could be a valid scale id.
-
-
-
Method Detail
-
create
static ScaleId create(String id)
Returns a key instance by its string value.- Parameters:
id
- string value to use- Returns:
- new scale id instance
-
isValid
static boolean isValid(String id)
Returnstrue
if scale id passed as argument is notnull
and its value could be a valid scale id.- Parameters:
id
- scale id to be checked- Returns:
true
if scale id passed as argument is notnull
and its value could be a valid scale id.
-
isValid
static boolean isValid(ScaleId id)
Returnstrue
if scale id passed as argument is notnull
and its value is notnull
as well and could be a valid scale id.- Parameters:
id
- scale id to be checked- Returns:
true
if scale id passed as argument is notnull
and its value is notnull
as well and could be a valid scale id.
-
checkIfValid
static void checkIfValid(ScaleId id)
Checks if scale id passed as argument is notnull
and its value is notnull
as well and could be a valid scale id.
If not, throw aIllegalArgumentException
.- Parameters:
id
- scale id to be checked
-
checkIfValid
static void checkIfValid(String id)
Checks if scale id passed as argument is notnull
and its value is notnull
as well and could be a valid scale id.
If not, throw aIllegalArgumentException
.- Parameters:
id
- scale id as string to be checked
-
checkAndGetScaleID
static ScaleId checkAndGetScaleID(String id, ScaleId defaultValue)
Returns the ID of the scale checking the default ones,DefaultScaleId
.- Parameters:
id
- scale id value stored in the a objectdefaultValue
- the default value if not exist- Returns:
- the ID of the scale
-
getAxisKind
AxisKind getAxisKind()
Returns the default axis kind for this default scale id.- Returns:
- the default axis kind for this default scale id
-
-