Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/requestobjects/DefaultFIS.java @ 792:9b9bf42b7928
Added and repaired JavaDoc in artifacts package.
gnv-artifacts/trunk@874 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 31 Mar 2010 10:52:34 +0000 |
parents | c4156275c1e1 |
children | feae2f9d6c6f |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/requestobjects/DefaultFIS.java Wed Mar 31 09:30:34 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/requestobjects/DefaultFIS.java Wed Mar 31 10:52:34 2010 +0000 @@ -4,6 +4,8 @@ import java.util.Iterator; /** + * The default implementation of <code>Fis</code>. + * * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> * */ @@ -14,14 +16,19 @@ private Collection<Parameter> parameter = null; + /** + * Constructor + * + * @param id The id for this fis. + */ public DefaultFIS(String id){ super(); this.id = id; } /** * Constructor - * @param id - * @param parameter + * @param id The id for this fis. + * @param parameter A collection of parameters. */ public DefaultFIS(String id, Collection<Parameter> parameter) { this(id); @@ -29,19 +36,25 @@ } /** - * @see de.intevation.gnv.artifacts.services.requestobjects.FIS#getID() + * @return the id. */ public String getID() { return this.id; } /** - * @see de.intevation.gnv.artifacts.services.requestobjects.FIS#getParameter() + * @return the parameter collection. */ public Collection<Parameter> getParameter() { return this.parameter; } + /** + * Two objects are equal if they have the same id. + * + * @param arg0 Object which is checked for equality. + * @return True, if both objects are equal, otherwise false. + */ @Override public boolean equals(Object arg0) { boolean returnValue = false; @@ -50,8 +63,21 @@ } return returnValue; } + /** - * @see de.intevation.gnv.artifacts.services.requestobjects.FIS#addParameter(java.util.Collection) + * Creates a hash code using the id and the given parameters. + * + * @return A hash code. + */ + @Override + public int hashCode() { + int hash = 7; + hash = 47 * hash + (this.id != null ? this.id.hashCode() : 0); + hash = 47 * hash + (this.parameter != null ? this.parameter.hashCode() : 0); + return hash; + } + /** + * @param parameter Collection of parameters. */ public void addParameter(Collection<Parameter> parameter) { if (this.parameter != null){ @@ -70,3 +96,4 @@ } +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : \ No newline at end of file