Interface Envelop
-
- All Known Implementing Classes:
AnnotationEnvelop
,BaseEnvelop
,CallbacksEnvelop
,ChartEnvelop
,ConfigurationEnvelop
,DataEnvelop
,DataLabelsEnvelop
,ImmutableEnvelop
,InteractionEnvelop
,ItemsEnvelop
,LabelsEnvelop
,OptionsEnvelop
,PluginsEnvelop
public interface Envelop
This 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 notnull
and its content is notnull
as well.
If not, throw aIllegalArgumentException
.static void
checkIfValid(Envelop envelop)
Checks if envelop passed as argument is notnull
and its content is notnull
as well.
If not, throw aIllegalArgumentException
.boolean
hasContent()
Returnstrue
if the content of envelop is notnull
.boolean
isNullable()
Returnstrue
if the content of envelop can benull
.static boolean
isValid(Envelop envelop)
Returnstrue
if envelop passed as argument is notnull
and its content is notnull
as well.
-
-
-
Method Detail
-
isValid
static boolean isValid(Envelop envelop)
Returnstrue
if envelop passed as argument is notnull
and its content is notnull
as well.- Parameters:
envelop
- envelop to be checked- Returns:
true
if envelop passed as argument is notnull
and its content is notnull
as well.
-
checkIfValid
static void checkIfValid(Envelop envelop)
Checks if envelop passed as argument is notnull
and its content is notnull
as 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 notnull
and its content is notnull
as 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()
Returnstrue
if the content of envelop is notnull
.- Returns:
true
if the content of envelop is notnull
-
isNullable
boolean isNullable()
Returnstrue
if the content of envelop can benull
.- Returns:
true
if the content of envelop can benull
-
-