blob: 8e7878974096dd04e3d1d261ff9835a01d22378e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/*
* Copyright (c) 2011 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
/*
* Copyright (c) 2015 Tarun Gupta.
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
package com.isode.stroke.jingle;
import com.isode.stroke.elements.JingleContentPayload;
import com.isode.stroke.elements.Payload;
import java.util.Vector;
public class Jingle {
public static <T extends Payload> JingleContentPayload getContentWithDescription(final Vector<JingleContentPayload> contents, T payload) {
for (JingleContentPayload jingleContentPayload : contents) {
if (jingleContentPayload.getDescription(payload) != null) {
return jingleContentPayload;
}
}
return null;
}
}
|