Class ApiOptionalResponse.BuilderBase<B extends ApiOptionalResponse.BuilderBase<B,​T,​X,​R>,​T extends ApiOptionalResponse<R>,​X,​R>

    • Constructor Detail

      • BuilderBase

        protected BuilderBase()
        New builder.
    • Method Detail

      • entityProcessor

        public B entityProcessor​(Function<X,​R> processor)
        A function to convert the entity to target object. The processor is only invoked in case an entity is present.
        Parameters:
        processor - create response object from entity
        Returns:
        updated builder
      • entity

        protected Optional<X> entity()
        Entity as received from network.
        Returns:
        entity if present, empty otherwise
      • entityProcessor

        protected Function<X,​R> entityProcessor()
        The configured entity processor.
        Returns:
        processor