view flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Timerange.java @ 3784:9f9d5ada96ca

Merged revisions 5498-5499 via svnmerge from file:///home/clients/bsh/bsh-generischer-viewer/Material/SVN/flys-artifacts/trunk ........ r5498 | rrenkert | 2012-09-17 16:38:47 +0200 (Mo, 17 Sep 2012) | 3 lines Refactor MINFO bed quality resultsets and facets. ........ r5499 | rrenkert | 2012-09-17 16:47:05 +0200 (Mo, 17 Sep 2012) | 2 lines Fixed date range in minfo bed quality result. ........ flys-artifacts/tags/2.9.1@5530 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 19 Sep 2012 14:56:13 +0000
parents 2e6f0ef36352
children
line wrap: on
line source
package de.intevation.flys.artifacts.model;

import java.io.Serializable;

import java.util.Date;


/**
 * This class represents time ranges specified by start and end time. Start and
 * end times are stored as long (number of milliseconds since january 1, 1970).
 *
 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
 */
public class Timerange implements Serializable {

    private long start;
    private long end;


    public Timerange(long start, long end) {
        this.start = start;
        this.end   = end;
    }


    public Timerange(Date start, Date stop) {
        this.start = start.getTime();
        this.end   = stop != null ? stop.getTime() : System.currentTimeMillis();
    }


    public long getStart() {
        return start;
    }


    public long getEnd() {
        return end;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org