diff options
Diffstat (limited to 'src/main/java/net/transit/packet/ArrayPacket.java')
-rw-r--r-- | src/main/java/net/transit/packet/ArrayPacket.java | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/main/java/net/transit/packet/ArrayPacket.java b/src/main/java/net/transit/packet/ArrayPacket.java deleted file mode 100644 index 09ef5f1..0000000 --- a/src/main/java/net/transit/packet/ArrayPacket.java +++ /dev/null @@ -1,37 +0,0 @@ -package net.transit.packet; - -import java.util.ArrayList; - -public class ArrayPacket<D> implements IPacket<D> -{ - private ArrayList<D> arrayData; - - public ArrayPacket(D startValue) - { - arrayData = new ArrayList<D>(0); - arrayData.add(startValue); - } - - public D getData() - { - if(arrayData.size() > 0) return arrayData.get(0); - return null; - } - - public void addData(D data) - { - arrayData.add(data); - } - - public D popAndShift() - { - D temp = null; - - if(arrayData.size() > 0) - { - temp = arrayData.remove(0); - } - - return temp; - } -}
\ No newline at end of file |