comparison 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
comparison
equal deleted inserted replaced
88:69c84cf7c5d7 89:d348fe1fd822
1 package de.intevation.artifactdatabase; 1 package de.intevation.artifactdatabase;
2 2
3 import java.util.List; 3 import java.util.List;
4 4
5 /** 5 /**
6 * Class to model the concept of an 'id' in terms of unique integer as
7 * used in databases. Subclasses of this class are able to be processed
8 * by this id.
9 *
6 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> 10 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
7 */ 11 */
8 public class Id 12 public class Id
9 { 13 {
14 /**
15 * Interface to filter a list of ids.
16 */
10 public interface Filter { 17 public interface Filter {
18 /**
19 * A list of ids is processed in a functional way to be
20 * free from some ids by the implementing code. The resulting
21 * list maybe short or equal sized to the original one. The
22 * original list is not modified.
23 * @param ids The list of input ids.
24 * @return A list of processed ids.
25 */
11 List filterIds(List ids); 26 List filterIds(List ids);
12 } 27 }
13 28
29 /**
30 * The backing int of the id.
31 */
14 protected int id; 32 protected int id;
15 33
34 /**
35 * Default constructor: id = 0
36 */
16 public Id() { 37 public Id() {
17 } 38 }
18 39
40 /**
41 * Constructor to create an id with a given value.
42 * @param id The id value
43 */
19 public Id(int id) { 44 public Id(int id) {
20 this.id = id; 45 this.id = id;
21 } 46 }
22 47
48 /**
49 * Returns the id value.
50 * @return The value of the id.
51 */
23 public int getId() { 52 public int getId() {
24 return id; 53 return id;
25 } 54 }
26 } 55 }
27 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: 56 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org