T
- type of envelop content.public abstract class ImmutableEnvelop<T> extends Object implements Envelop
Modifier | Constructor and Description |
---|---|
protected |
ImmutableEnvelop(T content)
Create an envelop with the content passed as argument.
|
protected |
ImmutableEnvelop(T content,
boolean nullable)
Create an envelop with the content passed as argument and a flag to set if the content can be nullable.
|
Modifier and Type | Method and Description |
---|---|
T |
getContent()
Returns the content of envelop.
|
boolean |
hasContent()
Returns
true if the content of envelop is not null . |
boolean |
isNullable()
Returns
true if the content of envelop can be null . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkAndGetIfValid, checkIfValid, isValid
protected ImmutableEnvelop(T content)
content
- content to set as initial valueprotected ImmutableEnvelop(T content, boolean nullable)
content
- content to set as initial valuenullable
- if true
, the content can be null
public final T getContent()
public final boolean hasContent()
Envelop
true
if the content of envelop is not null
.hasContent
in interface Envelop
true
if the content of envelop is not null
public final boolean isNullable()
Envelop
true
if the content of envelop can be null
.isNullable
in interface Envelop
true
if the content of envelop can be null