/* * 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 JingleContentPayload getContentWithDescription(final Vector contents, T payload) { for (int i = 0; i < contents.size(); ++i) { if (contents.get(i).getDescription(payload) != null) { return contents.get(i); } } return null; } }