19 package org.turro.elephant.entities.db;
21 import java.util.EnumSet;
34 private final boolean starts;
45 return getValidNexts(previousType).contains(
this);
49 if(
null == previous) {
50 if(TRACK_END.equals(
this)) {
55 if(TRACK_PAUSE.equals(
this) || TRACK_END.equals(
this)) {
60 if(TRACK_RESUME.equals(
this)) {
62 }
else if(TRACK_START.equals(
this)) {
67 if(TRACK_RESUME.equals(
this) || TRACK_START.equals(
this)) {
79 return EnumSet.of(TRACK_START);
80 }
else switch (type) {
82 return EnumSet.of(TRACK_START);
84 return EnumSet.of(TRACK_END, TRACK_PAUSE);
86 return EnumSet.of(TRACK_RESUME);
88 return EnumSet.of(TRACK_END, TRACK_PAUSE);
95 return EnumSet.of(TRACK_START, TRACK_PAUSE, TRACK_RESUME);
99 return EnumSet.of(TRACK_END);
103 return EnumSet.of(TRACK_START, TRACK_RESUME);
107 return EnumSet.of(TRACK_PAUSE, TRACK_END);
TimeTrackerType getTrackType()
boolean isPreviousValid(TimeTrackerType previousType)
static EnumSet< TimeTrackerType > getStartTypes()
static EnumSet< TimeTrackerType > getValidNexts(TimeTrackerType type)
static EnumSet< TimeTrackerType > getEndTypes()
static EnumSet< TimeTrackerType > getInactiveTypes()
static EnumSet< TimeTrackerType > getActiveTypes()
TimeTrackerType getValidRepair(TimeTracker previous)