package net.transit.network.packet; import net.transit.type.Type; /** Simple packet which stores an unchanging value. * @author Kyle Gunger * * @param The data type (Object) that the packet transfers. */ public class StaticPacket implements IStaticPacket { private D data; private Type type; /** Constructor. Stores the given data and uses the given type. * * @param dat The packet's data * @param t The packet's type */ public StaticPacket(D dat, Type t) { data = dat; type = t; } @Override public D getData() { return data; } @Override public Type getType() { return type; } }