Package fr.ghostrider584.axiom.network
Record Class IdentifiedNetworkType.NetworkTypeEntry<T>
java.lang.Object
java.lang.Record
fr.ghostrider584.axiom.network.IdentifiedNetworkType.NetworkTypeEntry<T>
- Enclosing interface:
IdentifiedNetworkType<T>
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkTypeEntry(byte id, Class<T> type, net.minestom.server.network.NetworkBuffer.Type<T> networkType) Creates an instance of aNetworkTypeEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> IdentifiedNetworkType.NetworkTypeEntry<T> final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.byteid()Returns the value of theidrecord component.net.minestom.server.network.NetworkBuffer.Type<T> Returns the value of thenetworkTyperecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
NetworkTypeEntry
public NetworkTypeEntry(byte id, Class<T> type, net.minestom.server.network.NetworkBuffer.Type<T> networkType) Creates an instance of aNetworkTypeEntryrecord class.- Parameters:
id- the value for theidrecord componenttype- the value for thetyperecord componentnetworkType- the value for thenetworkTyperecord component
-
-
Method Details
-
entry
public static <T> IdentifiedNetworkType.NetworkTypeEntry<T> entry(int id, Class<T> type, net.minestom.server.network.NetworkBuffer.Type<T> networkType) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
id
public byte id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
networkType
Returns the value of thenetworkTyperecord component.- Returns:
- the value of the
networkTyperecord component
-