X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftext%2FSonePart.java;h=3d3e666cf8b4deb59e183e08f4a45163158bb6d2;hp=b460a29ce5ee0bca50d04d33aa01711bcf5abd22;hb=419098bcd6215125408b29e60bd888e60979d37b;hpb=ab7fada54ed08b0a8d9ce9c606cbea29c3c3f819 diff --git a/src/main/java/net/pterodactylus/sone/text/SonePart.java b/src/main/java/net/pterodactylus/sone/text/SonePart.java index b460a29..3d3e666 100644 --- a/src/main/java/net/pterodactylus/sone/text/SonePart.java +++ b/src/main/java/net/pterodactylus/sone/text/SonePart.java @@ -1,5 +1,5 @@ /* - * Sone - SoneLinkPart.java - Copyright © 2011 David Roden + * Sone - SonePart.java - Copyright © 2011–2015 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 @@ -21,20 +21,48 @@ import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.template.SoneAccessor; /** - * TODO + * {@link Part} implementation that stores a reference to a {@link Sone}. * * @author David ‘Bombe’ Roden */ 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); + } + }