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, waitcheckAndGetIfValid, checkIfValid, isValidprotected 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 nullpublic final T getContent()
public final boolean hasContent()
Enveloptrue if the content of envelop is not null.hasContent in interface Enveloptrue if the content of envelop is not nullpublic final boolean isNullable()
Enveloptrue if the content of envelop can be null.isNullable in interface Enveloptrue if the content of envelop can be null