Merge branch 'release-0.9.6'
[Sone.git] / src / main / java / net / pterodactylus / sone / text / PlainTextPart.java
index 4870bc4..7bdbee9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - PlainTextPart.java - Copyright © 2011 David Roden
+ * Sone - PlainTextPart.java - Copyright © 2011–2016 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 
 package net.pterodactylus.sone.text;
 
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Iterator;
+import java.util.Objects;
 
-import net.pterodactylus.util.collection.ObjectIterator;
+import javax.annotation.Nonnull;
 
 /**
- * TODO
+ * {@link Part} implementation that holds a single piece of text.
  *
  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
@@ -32,14 +30,12 @@ public class PlainTextPart implements Part {
 
        private final String text;
 
-       public PlainTextPart(String text) {
-               this.text = text;
+       public PlainTextPart(@Nonnull String text) {
+               this.text = Objects.requireNonNull(text);
        }
 
-       //
-       // ACCESSORS
-       //
-
+       @Override
+       @Nonnull
        public String getText() {
                return text;
        }