Record Class BusEvent
java.lang.Object
java.lang.Record
net.mathias2246.buildmc.api.messageBus.BusEvent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull StringReturns the value of thechannelIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull com.google.gson.JsonObjectpayload()Returns the value of thepayloadrecord component.@NotNull StringReturns the value of thepublisherIdrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.@NotNull SemVerversion()Returns the value of theversionrecord component.
-
Constructor Details
-
BusEvent
public BusEvent(@NotNull @NotNull String channelId, @NotNull @NotNull SemVer version, @NotNull @NotNull String publisherId, @NotNull @NotNull com.google.gson.JsonObject payload, long timestamp) Creates an instance of aBusEventrecord class.- Parameters:
channelId- the value for thechannelIdrecord componentversion- the value for theversionrecord componentpublisherId- the value for thepublisherIdrecord componentpayload- the value for thepayloadrecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
channelId
Returns the value of thechannelIdrecord component.- Returns:
- the value of the
channelIdrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
publisherId
Returns the value of thepublisherIdrecord component.- Returns:
- the value of the
publisherIdrecord component
-
payload
@NotNull public @NotNull com.google.gson.JsonObject payload()Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-