Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/utils/IdGenerator.java @ 3428:842b7b635701
Use a new state - specific for SQ relation - for the period input in the SQ relation.
flys-artifacts/trunk@5086 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 20 Jul 2012 10:22:38 +0000 |
parents | e0e9a2629d7d |
children |
rev | line source |
---|---|
3218
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.utils; |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 public class IdGenerator { |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 protected int id; |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 public IdGenerator() { |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 } |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 public IdGenerator(int id) { |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 this.id = id; |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 } |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 public int next() { |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 return id++; |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 } |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 } |
e0e9a2629d7d
FixA: Moved IdGenerator to top level class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
18 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |