Interface Envelop
-
- All Known Implementing Classes:
AnnotationEnvelop,BaseEnvelop,CallbacksEnvelop,ChartEnvelop,ConfigurationEnvelop,DataEnvelop,DataLabelsEnvelop,ImmutableEnvelop,InteractionEnvelop,ItemsEnvelop,LabelsEnvelop,OptionsEnvelop,PluginsEnvelop
public interface EnvelopThis is the interface to map the envelop.
It adds helpful methods to check the envelop.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T extends Envelop>
TcheckAndGetIfValid(T envelop)Checks if envelop passed as argument is notnulland its content is notnullas well.
If not, throw aIllegalArgumentException.static voidcheckIfValid(Envelop envelop)Checks if envelop passed as argument is notnulland its content is notnullas well.
If not, throw aIllegalArgumentException.booleanhasContent()Returnstrueif the content of envelop is notnull.booleanisNullable()Returnstrueif the content of envelop can benull.static booleanisValid(Envelop envelop)Returnstrueif envelop passed as argument is notnulland its content is notnullas well.
-
-
-
Method Detail
-
isValid
static boolean isValid(Envelop envelop)
Returnstrueif envelop passed as argument is notnulland its content is notnullas well.- Parameters:
envelop- envelop to be checked- Returns:
trueif envelop passed as argument is notnulland its content is notnullas well.
-
checkIfValid
static void checkIfValid(Envelop envelop)
Checks if envelop passed as argument is notnulland its content is notnullas well.
If not, throw aIllegalArgumentException.- Parameters:
envelop- envelop to be checked
-
checkAndGetIfValid
static <T extends Envelop> T checkAndGetIfValid(T envelop)
Checks if envelop passed as argument is notnulland its content is notnullas well.
If not, throw aIllegalArgumentException.- Type Parameters:
T- type of envelop- Parameters:
envelop- key to be checked- Returns:
- the same key passed as argument
-
hasContent
boolean hasContent()
Returnstrueif the content of envelop is notnull.- Returns:
trueif the content of envelop is notnull
-
isNullable
boolean isNullable()
Returnstrueif the content of envelop can benull.- Returns:
trueif the content of envelop can benull
-
-