From aed6ed909ee81beecac2836cb86654efe29e154b Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Wed, 15 Apr 2020 15:09:41 -0400 Subject: [Update] Version 0.5.1 More documentation, and an updated list of packets --- .../net/transit/network/packet/MetaPacket.java | 34 ++++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'src/main/java/net/transit/network/packet/MetaPacket.java') diff --git a/src/main/java/net/transit/network/packet/MetaPacket.java b/src/main/java/net/transit/network/packet/MetaPacket.java index 0240519..7e49318 100644 --- a/src/main/java/net/transit/network/packet/MetaPacket.java +++ b/src/main/java/net/transit/network/packet/MetaPacket.java @@ -2,32 +2,34 @@ package net.transit.network.packet; import net.transit.type.Type; -public class MetaPacket implements Packet +/** Static packet with extra data attached. + * @author Kyle Gunger + * + * @param The data type (Object) that the packet transfers + * @param The type of metadata +*/ +public class MetaPacket extends StaticPacket { - - private D data; private M metaData; - private Type type; + /** Constructor + * + * @param dat The data to store + * @param t The Type of the data + * @param meta The metadata to store + */ public MetaPacket(D dat, Type t, M meta) { - data = dat; - type = t; + super(dat, t); metaData = meta; } - - public D getData() - { - return data; - } + /** Get the metadata of the packet. + * + * @return The packet's metadata + */ public M getMetaData() { return metaData; } - - @Override - public Type getType() { - return type; - } } -- cgit v1.2.3