diff options
Diffstat (limited to 'src/com/isode/stroke/elements/Thread.java')
-rw-r--r-- | src/com/isode/stroke/elements/Thread.java | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/src/com/isode/stroke/elements/Thread.java b/src/com/isode/stroke/elements/Thread.java new file mode 100644 index 0000000..40eeb8b --- /dev/null +++ b/src/com/isode/stroke/elements/Thread.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2015 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.elements.Payload; +import com.isode.stroke.base.NotNull; + +public class Thread extends Payload { + + private String text_ = ""; + private String parent_ = ""; + + /** + * Default Constructor. + */ + public Thread() { + this("", ""); + } + + /** + * Parameterized Constructor. + * @param text, Not Null. + */ + public Thread(String text) { + this(text, ""); + } + + /** + * Parameterized Constructor. + * @param text, Not Null. + * @param parent, not Null. + */ + public Thread(String text, String parent) { + NotNull.exceptIfNull(text, "text"); + NotNull.exceptIfNull(parent, "parent"); + this.text_ = text; + this.parent_ = parent; + } + + /** + * @param text, not Null. + */ + public void setText(String text) { + NotNull.exceptIfNull(text, "text"); + text_ = text; + } + + /** + * @return text, not Null. + */ + public String getText() { + return text_; + } + + /** + * @param parent, not Null. + */ + public void setParent(String parent) { + NotNull.exceptIfNull(parent, "parent"); + parent_ = parent; + } + + /** + * @return parent, not Null. + */ + public String getParent() { + return parent_; + } +}
\ No newline at end of file |