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

com.geotab.model.entity.worktime.WorkTimeDetail Maven / Gradle / Ivy

package com.geotab.model.entity.worktime;

import com.geotab.model.entity.Entity;
import com.geotab.model.enumeration.DayOfWeek;
import java.time.Duration;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * The times during the week that are working times.
 */
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class WorkTimeDetail extends Entity {

  public static final int MAX_VALUE = 86399999;

  public static final int MIN_VALUE = 0;

  /**
   * Day of the week; with Sunday being 0, Monday being 1, etc..
   */
  private DayOfWeek dayOfWeek;

  /**
   * The timeSpan since the start of the period.
   */
  private Duration fromTime;

  /**
   * The timeSpan to the end of the period.
   */
  private Duration toTime;

  @Builder
  public WorkTimeDetail(String id, DayOfWeek dayOfWeek, Duration fromTime, Duration toTime) {
    super(id);
    this.dayOfWeek = dayOfWeek;
    this.fromTime = fromTime;
    this.toTime = toTime;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy