diff options
Diffstat (limited to 'src/com/isode/stroke/elements/BlockPayload.java')
-rw-r--r-- | src/com/isode/stroke/elements/BlockPayload.java | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/com/isode/stroke/elements/BlockPayload.java b/src/com/isode/stroke/elements/BlockPayload.java new file mode 100644 index 0000000..8ce8620 --- /dev/null +++ b/src/com/isode/stroke/elements/BlockPayload.java @@ -0,0 +1,50 @@ +/* + * 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.elements; + +import com.isode.stroke.base.NotNull; +import com.isode.stroke.elements.Payload; +import com.isode.stroke.jid.JID; +import java.util.Vector; + +public class BlockPayload extends Payload { + + Vector<JID> items = new Vector<JID>(); + + public BlockPayload() { + + } + + /** + * Parameterized Constructor. + * @param items, Not NUll. + */ + public BlockPayload(Vector<JID> items) { + NotNull.exceptIfNull(items, "items"); + this.items = items; + } + + /** + * @param item, NotNull. + */ + public void addItem(JID item) { + NotNull.exceptIfNull(item, "item"); + items.add(item); + } + + /** + * @return items, NotNull. + */ + public Vector<JID> getItems() { + return items; + } +}
\ No newline at end of file |