summaryrefslogtreecommitdiff
path: root/src/main/java/net/transit/network/packet/IStaticPacket.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/transit/network/packet/IStaticPacket.java')
-rw-r--r--src/main/java/net/transit/network/packet/IStaticPacket.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/net/transit/network/packet/IStaticPacket.java b/src/main/java/net/transit/network/packet/IStaticPacket.java
new file mode 100644
index 0000000..01073d3
--- /dev/null
+++ b/src/main/java/net/transit/network/packet/IStaticPacket.java
@@ -0,0 +1,23 @@
+package net.transit.network.packet;
+
+import net.transit.type.Type;
+
+/** Interface describing an unchanging packet.
+ * @author Kyle Gunger
+ *
+ * @param <D> The data type (Object) that the packet transfers.
+ */
+public interface IStaticPacket<D>
+{
+ /**Get the packet's data.
+ *
+ * @return <D> The packet's data
+ */
+ public D getData();
+
+ /**Get the packet's type.
+ *
+ * @return IType<<D>> The type of the packet
+ */
+ public Type<D> getType();
+} \ No newline at end of file