Class OperationResult<T extends PlannableOnCalendar,​U extends Occurrence>

    • Constructor Detail

      • OperationResult

        public OperationResult()
    • Method Detail

      • withUpdated

        public <R extends OperationResult<T,​U>> R withUpdated​(T updated)
        Sets to this result the planned object that was updated within the operation.
        Parameters:
        updated - the updated planned object.
        Returns:
        itself.
      • withCreated

        public <R extends OperationResult<T,​U>> R withCreated​(T created)
        Sets to this result the planned object that was created within the operation.
        Parameters:
        created - the created planned object.
        Returns:
        itself.
      • withInstance

        public <R extends OperationResult<T,​U>> R withInstance​(U instance)
        Sets to this result an instance of a planned object that was updated within the operation.
        Parameters:
        instance - the updated instance of a planned object.
        Returns:
        itself.
      • updated

        public Optional<T> updated()
        Gets the optional updated planned object.
        Returns:
        an option with the planned object that was updated within an operation. The option is empty if no such object was updated.
      • created

        public Optional<T> created()
        Gets the optional created planned object.
        Returns:
        an option with the planned object that was created within an operation. The option is empty if no such object was created.
      • instance

        public Optional<U> instance()
        Gets the optional updated instance of a planned object.
        Returns:
        an option with the instance of a planned object that was updated within an operation. The option is empty if no such instance was updated.
      • isEmpty

        public boolean isEmpty()
        Is this operation result empty? A result is empty if the operation concludes in no update nor creation of a resource. This is can be for a deletion for example.
        Returns:
        true if there is no result, false otherwise.