/*
- * 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>
*/
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;
}