diff options
author | Tarun Gupta <tarun1995gupta@gmail.com> | 2015-06-26 08:20:59 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2015-07-06 13:52:48 (GMT) |
commit | fcdff3f162995170469833a82f607903e660812d (patch) | |
tree | e9d3cc18c8454b43ebdc1e9b9568d1f4456b59eb /src/com/isode/stroke/elements/BlockListPayload.java | |
parent | 79b532d8b6702a5599e7a3eac1416f562405668e (diff) | |
download | stroke-fcdff3f162995170469833a82f607903e660812d.zip stroke-fcdff3f162995170469833a82f607903e660812d.tar.bz2 |
Minor Fixes for Elements.
Adds Block Element, BlockList, and Unblock Element.
Updates some Elements just for consistency.
Updates Last Element, its Parser and Serializer for consistency with Swiften.
License:
This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Test-Information:
None.
Change-Id: If40c2516b944b1939db08721bb4de4554c3264f6
Diffstat (limited to 'src/com/isode/stroke/elements/BlockListPayload.java')
-rw-r--r-- | src/com/isode/stroke/elements/BlockListPayload.java | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/com/isode/stroke/elements/BlockListPayload.java b/src/com/isode/stroke/elements/BlockListPayload.java new file mode 100644 index 0000000..5c6904d --- /dev/null +++ b/src/com/isode/stroke/elements/BlockListPayload.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 BlockListPayload extends Payload { + + Vector<JID> items = new Vector<JID>(); + + public BlockListPayload() { + + } + + /** + * Parameterized Constructor. + * @param items, Not NUll. + */ + public BlockListPayload(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 |