Class ResultAndLogs<T>

  • Type Parameters:
    T - The resulting type of the method call.
    All Implemented Interfaces:
    java.io.Serializable

    public class ResultAndLogs<T>
    extends java.lang.Object
    implements java.io.Serializable
    This object represents the result of a method call. It contains the resulting object as well as any log messages occurred during method execution.
    Author:
    Copyright (c) 2014-2020 Piketec GmbH - MIT License (MIT) - All rights reserved
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ResultAndLogs​(T result, Log log)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Log getLog()
      Returns a list of log entries that have been occurred during the execution of the method.
      T getResult()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResultAndLogs

        public ResultAndLogs​(T result,
                             Log log)
        Constructor. Should not be called manually. Will be called from implementation of api methods.
        Parameters:
        result - the result of the method call
        log - list of log messages
    • Method Detail

      • getResult

        public T getResult()
        Returns:
        The resulting object of the method call
      • getLog

        public Log getLog()
        Returns a list of log entries that have been occurred during the execution of the method.
        Returns:
        List of log messages. Empty if no error or warning messages have been occurred.