aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http/commands/Duration.java
blob: e50f0c23ec1a16cc3d75d969084950ae23e98adc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package org.traccar.http.commands;

public class Duration {

    public enum TimeUnit {
        SECOND("s"), MINUTE("m"), HOUR("h");

        private final String commandFormat;

        TimeUnit(String commandFormat) {
            this.commandFormat = commandFormat;
        }

        public String getCommandFormat() {
            return commandFormat;
        }
    }


    private TimeUnit unit;
    private int value;

    public TimeUnit getUnit() {
        return unit;
    }

    public void setUnit(TimeUnit unit) {
        this.unit = unit;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }
}