Interface AnnotationId
-
- All Superinterfaces:
Key
,PropertyKey
public interface AnnotationId extends PropertyKey
Represents the annotation id of a annotation configuration object in theAnnotationPlugin.ID
plugin.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
Static Methods Modifier and Type Method Description static AnnotationId
checkAndGetAnnotationID(String id, AnnotationId defaultValue)
Returns the ID of the annotation checking is consistent.static void
checkIfValid(String id)
Checks if id passed as argument is notnull
and its value is notnull
as well and could be a valid annotation configuration object id.
If not, throw aIllegalArgumentException
.static void
checkIfValid(AnnotationId id)
Checks if id passed as argument is notnull
and its value is notnull
as well and could be a valid annotation configuration object id.
If not, throw aIllegalArgumentException
.static AnnotationId
create(String id)
Returns a key instance by its string value.static boolean
isValid(String id)
Returnstrue
if id passed as argument is notnull
and its value could be a valid annotation configuration object id.static boolean
isValid(AnnotationId id)
Returnstrue
if id passed as argument is notnull
and its value is notnull
as well and could be a valid annotation configuration object id.
-
-
-
Method Detail
-
create
static AnnotationId create(String id)
Returns a key instance by its string value.- Parameters:
id
- string value to use- Returns:
- new annotation configuration object id instance
-
isValid
static boolean isValid(String id)
Returnstrue
if id passed as argument is notnull
and its value could be a valid annotation configuration object id.- Parameters:
id
- annotation configuration object id to be checked- Returns:
true
if id passed as argument is notnull
and its value could be a valid annotation configuration object id.
-
isValid
static boolean isValid(AnnotationId id)
Returnstrue
if id passed as argument is notnull
and its value is notnull
as well and could be a valid annotation configuration object id.- Parameters:
id
- annotation configuration object id to be checked- Returns:
true
if id passed as argument is notnull
and its value is notnull
as well and could be a valid annotation configuration object id.
-
checkIfValid
static void checkIfValid(AnnotationId id)
Checks if id passed as argument is notnull
and its value is notnull
as well and could be a valid annotation configuration object id.
If not, throw aIllegalArgumentException
.- Parameters:
id
- annotation configuration object id to be checked
-
checkIfValid
static void checkIfValid(String id)
Checks if id passed as argument is notnull
and its value is notnull
as well and could be a valid annotation configuration object id.
If not, throw aIllegalArgumentException
.- Parameters:
id
- annotation configuration object id as string to be checked
-
checkAndGetAnnotationID
static AnnotationId checkAndGetAnnotationID(String id, AnnotationId defaultValue)
Returns the ID of the annotation checking is consistent.- Parameters:
id
- id value, as string, to create new annotation id objectdefaultValue
- the default value if the id parameter is not a valid, it can not be a annotation id due to its value.- Returns:
- the ID of the annotation
-
-