Mercurial > dive4elements > framework
diff artifact-database/src/main/java/de/intevation/artifactdatabase/Id.java @ 89:d348fe1fd822
More javadoc (fixes small glitches, too).
artifacts/trunk@845 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 26 Mar 2010 16:16:32 +0000 |
parents | 8447467cef86 |
children | 933bbc9fc11f |
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Id.java Fri Mar 26 15:05:11 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Id.java Fri Mar 26 16:16:32 2010 +0000 @@ -3,25 +3,54 @@ import java.util.List; /** + * Class to model the concept of an 'id' in terms of unique integer as + * used in databases. Subclasses of this class are able to be processed + * by this id. + * * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> */ public class Id { + /** + * Interface to filter a list of ids. + */ public interface Filter { + /** + * A list of ids is processed in a functional way to be + * free from some ids by the implementing code. The resulting + * list maybe short or equal sized to the original one. The + * original list is not modified. + * @param ids The list of input ids. + * @return A list of processed ids. + */ List filterIds(List ids); } + /** + * The backing int of the id. + */ protected int id; + /** + * Default constructor: id = 0 + */ public Id() { } + /** + * Constructor to create an id with a given value. + * @param id The id value + */ public Id(int id) { this.id = id; } + /** + * Returns the id value. + * @return The value of the id. + */ public int getId() { return id; } } -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :