public final class AvpList extends AbstractList<Avp> implements Serializable
modCount| Constructor and Description |
|---|
AvpList()
Creates a new empty AvpList.
|
AvpList(Avp[] avps) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Attribute attr,
Object value)
Adds a new AVP to the list of AVPs.
|
void |
add(int i,
Avp avp) |
void |
add(String name,
Object value)
Adds a new AVP by name to the list of AVPs.
|
XmlBuffer |
appendXml(XmlBuffer xb) |
void |
decode(ByteBuffer bb) |
ByteBuffer |
encode(ByteBuffer bb) |
Avp |
get(Attribute attr)
Returns the first AVP for the specified Attribute, or null if none.
|
Avp |
get(int i) |
Avp |
get(String name)
Returns the first AVP for the specific attribute name, or null if none
|
Avp |
getLast(Attribute attr)
Returns the last AVP for the specified Attribute, or null if none.
|
Avp |
remove(int i) |
Avp |
set(int i,
Avp avp) |
int |
size() |
String |
toString() |
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, streampublic AvpList()
public AvpList(Avp[] avps)
public void decode(ByteBuffer bb)
public ByteBuffer encode(ByteBuffer bb)
public Avp get(Attribute attr)
attr - the Attribute to search forpublic Avp get(String name)
name - the attribute namepublic Avp getLast(Attribute attr)
attr - the Attribute to search forpublic void add(Attribute attr, Object value)
attr - the AVP attributevalue - the AVP valueAvp.getValue()public void add(String name, Object value)
name - the AVP attribute namevalue - the AVP valuepublic Avp get(int i)
public int size()
size in interface Collection<Avp>size in interface List<Avp>size in class AbstractCollection<Avp>public void add(int i,
Avp avp)
public Avp remove(int i)
public String toString()
toString in class AbstractCollection<Avp>