summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Clayton <alex.clayton@isode.com>2016-02-02 11:26:01 (GMT)
committerAlex Clayton <alex.clayton@isode.com>2016-02-04 10:09:21 (GMT)
commitbe72c822d3cffd840e753e01fe28857b081cf6f3 (patch)
treeae3fe8fe22175f9bfee89f0688b71ca377f7f1e9 /src/com/isode/stroke/elements/BlockListPayload.java
parent2c9305a872e4ca958bfd86472c4540cc10d11a2f (diff)
downloadstroke-be72c822d3cffd840e753e01fe28857b081cf6f3.zip
stroke-be72c822d3cffd840e753e01fe28857b081cf6f3.tar.bz2
Add Block Parser and Serializer
Add BlockParser and BlockSerializer for the block payload classes. This required slightly different approach to the Swiften code as C++ templates are different to Java generics. In short needed to add a type hierachy to the Block payload classes and to the Parsers and Serilaizers associated with them. Test-information: Ran unit tests everything passed ok. Change-Id: I3ea2d66afd7cb3b5c4c3515be3a1ef99d7dbb566
Diffstat (limited to 'src/com/isode/stroke/elements/BlockListPayload.java')
-rw-r--r--src/com/isode/stroke/elements/BlockListPayload.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/com/isode/stroke/elements/BlockListPayload.java b/src/com/isode/stroke/elements/BlockListPayload.java
index 5c6904d..66bd30d 100644
--- a/src/com/isode/stroke/elements/BlockListPayload.java
+++ b/src/com/isode/stroke/elements/BlockListPayload.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Isode Limited.
+ * Copyright (c) 2011-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -11,12 +11,12 @@
package com.isode.stroke.elements;
+import java.util.Vector;
+
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 {
+public class BlockListPayload extends AbstractBlockPayload {
Vector<JID> items = new Vector<JID>();
@@ -36,7 +36,8 @@ public class BlockListPayload extends Payload {
/**
* @param item, NotNull.
*/
- public void addItem(JID item) {
+ @Override
+ public void addItem(JID item) {
NotNull.exceptIfNull(item, "item");
items.add(item);
}
@@ -44,7 +45,8 @@ public class BlockListPayload extends Payload {
/**
* @return items, NotNull.
*/
- public Vector<JID> getItems() {
+ @Override
+ public Vector<JID> getItems() {
return items;
}
} \ No newline at end of file