Mercurial > dive4elements > river
changeset 2227:2e6f0ef36352
Added a new constructor to Timerange that takes Date objects for start and end.
flys-artifacts/trunk@3867 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 01 Feb 2012 14:43:50 +0000 |
parents | 53d954973610 |
children | 4db19a88bddb |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Timerange.java |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Feb 01 14:07:38 2012 +0000 +++ b/flys-artifacts/ChangeLog Wed Feb 01 14:43:50 2012 +0000 @@ -1,3 +1,8 @@ +2012-02-01 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/model/Timerange.java: Added a + new constructor that takes Date objects for start and end time. + 2012-02-01 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/java/de/intevation/flys/artifacts/model/W.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Timerange.java Wed Feb 01 14:07:38 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Timerange.java Wed Feb 01 14:43:50 2012 +0000 @@ -2,6 +2,8 @@ import java.io.Serializable; +import java.util.Date; + /** * This class represents time ranges specified by start and end time. Start and @@ -21,6 +23,12 @@ } + public Timerange(Date start, Date stop) { + this.start = start.getTime(); + this.end = stop != null ? stop.getTime() : System.currentTimeMillis(); + } + + public long getStart() { return start; }