1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

Javadoc improvements in MultiMap and Stanza

This commit is contained in:
Florian Schmaus 2015-02-23 10:49:33 +01:00
parent b74b8c5757
commit afba123ba3
2 changed files with 8 additions and 2 deletions

View file

@ -230,12 +230,13 @@ public abstract class Stanza implements TopLevelStreamElement, Packet {
} }
/** /**
* Returns a copy of the packet extensions attached to the packet. * Returns a list of all extension elements of this stanza.
* *
* @return the packet extensions. * @return a list of all extension elements of this stanza.
*/ */
public List<PacketExtension> getExtensions() { public List<PacketExtension> getExtensions() {
synchronized (packetExtensions) { synchronized (packetExtensions) {
// No need to create a new list, values() will already create a new one for us
return packetExtensions.values(); return packetExtensions.values();
} }
} }

View file

@ -184,6 +184,11 @@ public class MultiMap<K,V> {
return map.keySet(); return map.keySet();
} }
/**
* Returns a new list containing all values of this multi map.
*
* @return a new list with all values.
*/
public List<V> values() { public List<V> values() {
List<V> values = new ArrayList<>(size()); List<V> values = new ArrayList<>(size());
for (Set<V> set : map.values()) { for (Set<V> set : map.values()) {