All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.dmx.client.model.TimeDataIndex Maven / Gradle / Ivy

The newest version!
package org.bidib.wizard.dmx.client.model;

import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

public class TimeDataIndex implements DmxDataIndex {

    private final int positionIndex;

    private final int timeValue;

    private final LocalTime time;

    private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("HH:mm");

    public TimeDataIndex(int positionIndex, int timeValue, final LocalTime time) {
        this.positionIndex = positionIndex;
        this.timeValue = timeValue;
        this.time = time;
    }

    @Override
    public int getPositionIndex() {
        return positionIndex;
    }

    public int getTimeValue() {
        return timeValue;
    }

    @Override
    public LocalTime getTime() {
        return time;
    }

    @Override
    public String toString() {
        return FORMATTER.format(time);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy