public class VDataPacket extends java.util.Vector<ADataPacket>
// make the vector of data packets
VDataPacket vdp = new VDataPacket();
vdp.add(datapacket1);
vdp.add(datapacket2);
vdp.add(datapacket3);
// etc
// make the composite data packet
ADataPacket vd = new DataPacket<VDataPacket>(VDataPacket.class, vdp);
This class is a vector of the abstract data packets, ADataPacket. If a vector of more specific
types of data packets is desired, a custom class that is a sub-class of the desired
Vector type should be used instead of this class. Composites made as such would be
distinguishable as per their held types.| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
VDataPacket() |
| Modifier and Type | Method and Description |
|---|---|
static <R,P> ADataPacketAlgoCmd<java.util.Vector<R>,VDataPacket,P> |
makeMapCmd(DataPacketAlgo<R,P> algo)
Convenience method that creates a command that maps a visitor over the vector of data packets.
|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSizeprivate static final long serialVersionUID
public static <R,P> ADataPacketAlgoCmd<java.util.Vector<R>,VDataPacket,P> makeMapCmd(DataPacketAlgo<R,P> algo)
R - The return type of the given visitor.P - The vararg input parameter type of the original visitor.algo - The visitor to be mapped over all the stored data packets.