summaryrefslogtreecommitdiff
path: root/src/main/java/net/transit/network/packet/ArrayPacket.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/transit/network/packet/ArrayPacket.java')
-rw-r--r--src/main/java/net/transit/network/packet/ArrayPacket.java52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/main/java/net/transit/network/packet/ArrayPacket.java b/src/main/java/net/transit/network/packet/ArrayPacket.java
deleted file mode 100644
index fbea811..0000000
--- a/src/main/java/net/transit/network/packet/ArrayPacket.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package net.transit.network.packet;
-
-import java.util.ArrayList;
-
-import net.transit.type.Type;
-
-public class ArrayPacket<D> implements Packet<D>
-{
- private ArrayList<D> arrayData;
- private Type<D> type;
-
- public ArrayPacket(D startValue, Type<D> t)
- {
- arrayData = new ArrayList<D>(0);
- arrayData.add(startValue);
- type = t;
- }
-
- @Override
- public D getData()
- {
- if(arrayData.size() > 0) return arrayData.get(0);
- return null;
- }
-
- public void addData(D data)
- {
- arrayData.add(data);
- }
-
- public int dataStored()
- {
- return arrayData.size();
- }
-
- public D popAndShift()
- {
- D temp = null;
-
- if(arrayData.size() > 0)
- {
- temp = arrayData.remove(0);
- }
-
- return temp;
- }
-
- @Override
- public Type<D> getType() {
- return type;
- }
-} \ No newline at end of file