/*
- * Sone - SoneLinkPart.java - Copyright © 2011 David Roden
+ * Sone - SonePart.java - Copyright © 2011–2013 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
import net.pterodactylus.sone.template.SoneAccessor;
/**
- * TODO
+ * {@link Part} implementation that stores a reference to a {@link Sone}.
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
public class SonePart implements Part {
+ /** The referenced {@link Sone}. */
private final Sone sone;
+ /**
+ * Creates a new Sone part.
+ *
+ * @param sone
+ * The referenced Sone
+ */
public SonePart(Sone sone) {
this.sone = sone;
}
+ //
+ // ACCESSORS
+ //
+
+ /**
+ * Returns the referenced Sone.
+ *
+ * @return The referenced Sone
+ */
public Sone getSone() {
return sone;
}
+ //
+ // PART METHODS
+ //
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getText() {
+ return SoneAccessor.getNiceName(sone);
+ }
+
}