|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAbstractTlvChain
DefaultMutableTlvChain
A default implementation of a (thread-safe) mutable TLV chain.
| Constructor Summary | |
protected |
DefaultMutableTlvChain()
Creates an empty TLV chain. |
protected |
DefaultMutableTlvChain(TlvChain other)
Creates a TLV chain containing the same TLV's as the given chain. |
| Method Summary | |
void |
addAll(TlvChain other)
Adds all TLV's in the given chain to the end of this chain (preserving order). |
void |
addTlv(Tlv tlv)
Adds the given TLV to this chain. |
protected java.util.List |
getTlvList()
Returns a list of all of the TLV's in this chain. |
protected java.util.Map |
getTlvMap()
Returns a map from TLV types (as Integers) to TLV lists (as
Lists). |
void |
removeTlv(Tlv tlv)
Removes the given TLV from the chain, if it is present. |
void |
removeTlvs(int type)
Removes all TLV's in this chain of the given TLV type. |
void |
removeTlvs(int[] types)
Removes all TLV's in this chain having any of the given types. |
void |
replaceAll(TlvChain other)
Deletes all TLV's currently in this chain having the same type as any of the TLV's in the other chain, and replaces them with their counterparts in the given chain. |
void |
replaceTlv(Tlv tlv)
Removes all TLV's of the given type from the chain, and inserts the given TLV at the index of the first TLV removed, or at the end of the chain if no TLV's of the same type were found. |
| Methods inherited from class AbstractTlvChain |
addTlvImpl, copy, createSiblingList, getFirstTlv, getLastTlv, getString, getString, getTlvCount, getTlvs, getTlvs, getTotalSize, getUInt, getUShort, getWritableLength, hasTlv, initFromBlock, iterator, toString, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface TlvChain |
getFirstTlv, getLastTlv, getString, getString, getTlvCount, getTlvs, getTlvs, getTotalSize, getUInt, getUShort, hasTlv, iterator |
| Methods inherited from interface net.kano.joscar.Writable |
getWritableLength, write |
| Constructor Detail |
protected DefaultMutableTlvChain()
protected DefaultMutableTlvChain(TlvChain other)
other - a TLV chain to copyaddAll(net.kano.joscar.tlv.TlvChain)| Method Detail |
public final void addTlv(Tlv tlv)
MutableTlvChain
addTlv in interface MutableTlvChaintlv - the TLV to addpublic final void replaceTlv(Tlv tlv)
MutableTlvChain
replaceTlv in interface MutableTlvChaintlv - the TLV to replace its "siblings" of the same TLV typepublic final void removeTlv(Tlv tlv)
MutableTlvChain
removeTlv in interface MutableTlvChaintlv - the TLV to removepublic final void removeTlvs(int type)
MutableTlvChain
removeTlvs in interface MutableTlvChaintype - the type of TLV of which to remove all instancespublic final void removeTlvs(int[] types)
MutableTlvChain
removeTlvs in interface MutableTlvChaintypes - the TLV types of which to remove all instancespublic final void addAll(TlvChain other)
MutableTlvChain
addAll in interface MutableTlvChainother - the chain whose TLV's will be appended to this chainpublic final void replaceAll(TlvChain other)
MutableTlvChain
replaceAll in interface MutableTlvChainother - the TLV whose TLV's will replace and/or add to TLV's in this
chainprotected java.util.List getTlvList()
AbstractTlvChain
getTlvList in class AbstractTlvChainprotected java.util.Map getTlvMap()
AbstractTlvChainIntegers) to TLV lists (as
Lists). The list should contain all TLV's of the given TLV
type that exist in this TLV chain, in the same order as they appear in
the full list.
getTlvMap in class AbstractTlvChain
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||