Interface AnnotationId
-
- All Superinterfaces:
Key,PropertyKey
public interface AnnotationId extends PropertyKey
Represents the annotation id of a annotation configuration object in theAnnotationPlugin.IDplugin.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
Static Methods Modifier and Type Method Description static AnnotationIdcheckAndGetAnnotationID(String id, AnnotationId defaultValue)Returns the ID of the annotation checking is consistent.static voidcheckIfValid(String id)Checks if id passed as argument is notnulland its value is notnullas well and could be a valid annotation configuration object id.
If not, throw aIllegalArgumentException.static voidcheckIfValid(AnnotationId id)Checks if id passed as argument is notnulland its value is notnullas well and could be a valid annotation configuration object id.
If not, throw aIllegalArgumentException.static AnnotationIdcreate(String id)Returns a key instance by its string value.static booleanisValid(String id)Returnstrueif id passed as argument is notnulland its value could be a valid annotation configuration object id.static booleanisValid(AnnotationId id)Returnstrueif id passed as argument is notnulland its value is notnullas 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)
Returnstrueif id passed as argument is notnulland its value could be a valid annotation configuration object id.- Parameters:
id- annotation configuration object id to be checked- Returns:
trueif id passed as argument is notnulland its value could be a valid annotation configuration object id.
-
isValid
static boolean isValid(AnnotationId id)
Returnstrueif id passed as argument is notnulland its value is notnullas well and could be a valid annotation configuration object id.- Parameters:
id- annotation configuration object id to be checked- Returns:
trueif id passed as argument is notnulland its value is notnullas well and could be a valid annotation configuration object id.
-
checkIfValid
static void checkIfValid(AnnotationId id)
Checks if id passed as argument is notnulland its value is notnullas 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 notnulland its value is notnullas 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
-
-