|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<ADataPacket>
datapacket.VDataPacket
public class VDataPacket
Composite data type for use in data packets: DataPacket<VDataPacket>
Note that Vector<VDataPacket> cannot be used as a data packet data type
directly because type erasure prevents the distinction between
Vector<A> and Vector<B> -- that is, they produce the same Class object.
Usage:
// 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.
| Field Summary | |
|---|---|
private static long |
serialVersionUID
|
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
VDataPacket()
|
|
| Method Summary | ||
|---|---|---|
static
|
makeMapCmd(DataPacketAlgo<R,P> algo)
Convenience method that creates a command that maps a visitor over the vector of data packets. |
|
| Methods inherited from class java.util.Vector |
|---|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
iterator, listIterator, listIterator |
| Field Detail |
|---|
private static final long serialVersionUID
| Constructor Detail |
|---|
public VDataPacket()
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||