Class Ping
java.lang.Object
org.tweetyproject.web.services.Ping
Represents a simple data structure for handling "ping" messages. Each Ping object
has an identifier (id) and content. This class is commonly used for testing the
connectivity or response of a service.
The Ping class provides mechanisms to initialize ping objects with or without specific
values, compare them, and generate consistent representations for logging or debugging.
- Author:
- Jonas Klein
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.Gets the content of the Ping object.longgetId()Gets the identifier of the Ping object.inthashCode()Returns a hash code value for the Ping object.toString()Returns a string representation of the Ping object.
-
Constructor Details
-
Ping
public Ping()Default constructor for the Ping class. Initializes id to -1 and content to an empty string. -
Ping
Constructor for the Ping class with specified id and content.- Parameters:
id- The identifier for the Ping object.content- The content of the Ping object.
-
-
Method Details
-
getId
public long getId()Gets the identifier of the Ping object.- Returns:
- The identifier (id) of the Ping object.
-
getContent
Gets the content of the Ping object.- Returns:
- The content of the Ping object.
-
equals
Indicates whether some other object is "equal to" this one. Equality is based on the equality of the id and content fields. -
hashCode
-
toString
-