Class ObjectMessage<T>

java.lang.Object
madkit.kernel.Message
madkit.messages.ObjectMessage<T>
Type Parameters:
T - the type of the object to be conveyed
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
BooleanMessage, EnumMessage, HookMessage, IntegerMessage, MapMessage, StringMessage

public class ObjectMessage<T> extends Message
This parameterizable class could be used to convey any Java Object between MaDKit agents.
Since:
MaDKit 5.0.0.1
See Also:
  • Constructor Details

    • ObjectMessage

      public ObjectMessage(T content)
      Builds a message with the specified content
      Parameters:
      content - the object to be conveyed
  • Method Details

    • getContent

      public T getContent()
      Gets the content of this message
      Returns:
      the object of type T contained in the message
    • toString

      public String toString()
      Returns a string representation of the message.
      Overrides:
      toString in class Message
      Returns:
      a string representation of the message
      See Also: