ingo@2217: package de.intevation.flys.artifacts.model; ingo@2217: ingo@2217: import java.io.Serializable; ingo@2217: ingo@2227: import java.util.Date; ingo@2227: ingo@2217: ingo@2217: /** ingo@2217: * This class represents time ranges specified by start and end time. Start and ingo@2217: * end times are stored as long (number of milliseconds since january 1, 1970). ingo@2217: * ingo@2217: * @author Ingo Weinzierl ingo@2217: */ ingo@2217: public class Timerange implements Serializable { ingo@2217: ingo@2217: private long start; ingo@2217: private long end; ingo@2217: ingo@2217: ingo@2217: public Timerange(long start, long end) { ingo@2217: this.start = start; ingo@2217: this.end = end; ingo@2217: } ingo@2217: ingo@2217: ingo@2227: public Timerange(Date start, Date stop) { ingo@2227: this.start = start.getTime(); ingo@2227: this.end = stop != null ? stop.getTime() : System.currentTimeMillis(); ingo@2227: } ingo@2227: ingo@2227: ingo@2217: public long getStart() { ingo@2217: return start; ingo@2217: } ingo@2217: ingo@2217: ingo@2217: public long getEnd() { ingo@2217: return end; ingo@2217: } ingo@2217: } ingo@2217: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :