From: <aki...@us...> - 2011-12-25 22:21:58
|
Revision: 9149 http://gridarta.svn.sourceforge.net/gridarta/?rev=9149&view=rev Author: akirschbaum Date: 2011-12-25 22:21:51 +0000 (Sun, 25 Dec 2011) Log Message: ----------- Add comments. Modified Paths: -------------- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/ArchParameter.java trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/BooleanParameter.java trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/DoubleParameter.java trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/IntegerParameter.java trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/MapParameter.java trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/StringParameter.java Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/ArchParameter.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/ArchParameter.java 2011-12-25 18:38:55 UTC (rev 9148) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/ArchParameter.java 2011-12-25 22:21:51 UTC (rev 9149) @@ -28,19 +28,29 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +/** + * A {@link PluginParameter} that holds an {@link Archetype} value. + */ public class ArchParameter<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractPluginParameter<G, A, R, Archetype<G, A, R>, Void> { + /** + * The string representation of this parameter type. + */ @NotNull public static final String PARAMETER_TYPE = Archetype.class.getName(); /** - * The archetype set. + * The {@link ArchetypeSet} for looking up archetypes. */ @NotNull private final ArchetypeSet<G, A, R> archetypeSet; private String valueString = null; + /** + * Creates a new instance. + * @param archetypeSet the archetype set for looking up archetypes + */ public ArchParameter(@NotNull final ArchetypeSet<G, A, R> archetypeSet) { this.archetypeSet = archetypeSet; } @@ -60,6 +70,9 @@ visitor.visit(this); } + /** + * {@inheritDoc} + */ @NotNull @Override public Element toXML() { @@ -75,6 +88,9 @@ return e; } + /** + * {@inheritDoc} + */ @Nullable @Override public Archetype<G, A, R> getValue() { Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/BooleanParameter.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/BooleanParameter.java 2011-12-25 18:38:55 UTC (rev 9148) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/BooleanParameter.java 2011-12-25 22:21:51 UTC (rev 9149) @@ -25,8 +25,14 @@ import org.jdom.Element; import org.jetbrains.annotations.NotNull; +/** + * A {@link PluginParameter} that holds a boolean value. + */ public class BooleanParameter<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractPluginParameter<G, A, R, Boolean, BooleanConfig> { + /** + * The string representation of this parameter type. + */ @NotNull public static final String PARAMETER_TYPE = Boolean.class.getName(); @@ -38,6 +44,9 @@ visitor.visit(this); } + /** + * {@inheritDoc} + */ @Override public void fromXML(@NotNull final Element e) { super.fromXML(e); @@ -65,6 +74,9 @@ } } + /** + * {@inheritDoc} + */ @NotNull @Override public Element toXML() { Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/DoubleParameter.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/DoubleParameter.java 2011-12-25 18:38:55 UTC (rev 9148) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/DoubleParameter.java 2011-12-25 22:21:51 UTC (rev 9149) @@ -26,8 +26,14 @@ import org.jdom.Element; import org.jetbrains.annotations.NotNull; +/** + * A {@link PluginParameter} that holds a double value. + */ public class DoubleParameter<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractPluginParameter<G, A, R, Double, DoubleConfig> { + /** + * The string representation of this parameter type. + */ @NotNull public static final String PARAMETER_TYPE = Double.class.getName(); @@ -39,6 +45,9 @@ visitor.visit(this); } + /** + * {@inheritDoc} + */ @Override public void fromXML(@NotNull final Element e) { super.fromXML(e); @@ -71,6 +80,9 @@ return true; } + /** + * {@inheritDoc} + */ @NotNull @Override public Element toXML() { Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/IntegerParameter.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/IntegerParameter.java 2011-12-25 18:38:55 UTC (rev 9148) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/IntegerParameter.java 2011-12-25 22:21:51 UTC (rev 9149) @@ -25,8 +25,14 @@ import org.jdom.Element; import org.jetbrains.annotations.NotNull; +/** + * A {@link PluginParameter} that holds an integer value. + */ public class IntegerParameter<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractPluginParameter<G, A, R, Integer, IntegerConfig> { + /** + * The string representation of this parameter type. + */ @NotNull public static final String PARAMETER_TYPE = Integer.class.getName(); @@ -38,6 +44,9 @@ visitor.visit(this); } + /** + * {@inheritDoc} + */ @Override public void fromXML(@NotNull final Element e) { super.fromXML(e); @@ -75,6 +84,9 @@ return true; } + /** + * {@inheritDoc} + */ @NotNull @Override public Element toXML() { Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/MapParameter.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/MapParameter.java 2011-12-25 18:38:55 UTC (rev 9148) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/MapParameter.java 2011-12-25 22:21:51 UTC (rev 9149) @@ -28,14 +28,29 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +/** + * A {@link PluginParameter} that holds a {@link MapControl} value. + */ public class MapParameter<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractPluginParameter<G, A, R, Object, Void> { // XXX: find correct parameter type: String or MapControl<GameObject, MapArchObject, Archetype> + /** + * The string representation of this parameter type. + */ @NotNull public static final String PARAMETER_TYPE = MapControl.class.getName(); + /** + * The {@link MapManager} for converting map paths to {@link MapControl} + * instances. + */ @NotNull private final MapManager<G, A, R> mapManager; + /** + * Creates a new instance. + * @param mapManager the map manager for converting map paths to map control + * instances + */ public MapParameter(@NotNull final MapManager<G, A, R> mapManager) { this.mapManager = mapManager; } @@ -49,6 +64,9 @@ return PARAMETER_TYPE; } + /** + * {@inheritDoc} + */ @Override public void fromXML(@NotNull final Element e) { super.fromXML(e); @@ -63,6 +81,9 @@ visitor.visit(this); } + /** + * {@inheritDoc} + */ @NotNull @Override public Element toXML() { @@ -73,6 +94,9 @@ return e; } + /** + * {@inheritDoc} + */ @Nullable @Override public Object getValue() { @@ -90,8 +114,11 @@ return mapManager.getCurrentMap(); } + /** + * {@inheritDoc} + */ @Override - public boolean setValue(final Object value) { + public boolean setValue(@Nullable final Object value) { if (value == null) { return super.setValue(null); } else { Modified: trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/StringParameter.java =================================================================== --- trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/StringParameter.java 2011-12-25 18:38:55 UTC (rev 9148) +++ trunk/plugin/src/app/net/sf/gridarta/plugin/parameter/StringParameter.java 2011-12-25 22:21:51 UTC (rev 9149) @@ -27,6 +27,9 @@ import org.jdom.Element; import org.jetbrains.annotations.NotNull; +/** + * A {@link PluginParameter} that holds a string value. + */ public class StringParameter<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractPluginParameter<G, A, R, String, Void> { /** @@ -34,9 +37,15 @@ */ private static final Category log = Logger.getLogger(StringParameter.class); + /** + * The string representation of this parameter type. + */ @NotNull public static final String PARAMETER_TYPE = String.class.getName(); + /** + * Creates a new instance. + */ public StringParameter() { if (log.isDebugEnabled()) { log.debug("New instance of " + StringParameter.class.getName()); @@ -53,6 +62,9 @@ return true; } + /** + * {@inheritDoc} + */ @Override public void fromXML(@NotNull final Element e) { super.fromXML(e); @@ -80,6 +92,9 @@ return PARAMETER_TYPE; } + /** + * {@inheritDoc} + */ @NotNull @Override public Element toXML() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |