Class ImmutableEnvelop<T>

    • Constructor Detail

      • ImmutableEnvelop

        protected ImmutableEnvelop​(T content)
        Create an envelop with the content passed as argument.
        Parameters:
        content - content to set as initial value
      • ImmutableEnvelop

        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.
        Parameters:
        content - content to set as initial value
        nullable - if true, the content can be null
    • Method Detail

      • getContent

        public final T getContent()
        Returns the content of envelop.
        Returns:
        the content of envelop
      • hasContent

        public final boolean hasContent()
        Description copied from interface: Envelop
        Returns true if the content of envelop is not null.
        Specified by:
        hasContent in interface Envelop
        Returns:
        true if the content of envelop is not null
      • isNullable

        public final boolean isNullable()
        Description copied from interface: Envelop
        Returns true if the content of envelop can be null.
        Specified by:
        isNullable in interface Envelop
        Returns:
        true if the content of envelop can be null