Class RunningPlanEntry

  • All Implemented Interfaces:
    de.hirola.kintojava.model.KintoModel

    public class RunningPlanEntry
    extends PersistentObject
    Copyright 2021 by Michael Schmidt, Hirola Consulting This software us licensed under the AGPL-3.0 or later. An entry in the running plan contains the day and the respective training sections for the individual weeks. An example: Week: 3, Day: 1 (Monday), 7 min total, 2 min run, 3 min slow walk, 2 min run
    Since:
    1.1.1
    Author:
    Michael Schmidt (Hirola)
    • Constructor Detail

      • RunningPlanEntry

        public RunningPlanEntry()
        Default constructor for reflection.
      • RunningPlanEntry

        public RunningPlanEntry​(int day,
                                int week,
                                @NotNull
                                @NotNull ArrayList<RunningUnit> runningUnits)
        Create a running plan entry.
        Parameters:
        day - of entry
        week - of entry
        runningUnits - of entry
        See Also:
        RunningUnit
    • Method Detail

      • getDay

        public int getDay()
        Get the (rounded) percentage of completed training sessions.
        Returns:
        The (rounded) percentage of completed training sessions
      • getWeek

        public int getWeek()
        Get the (rounded) percentage of completed training sessions.
        Returns:
        The (rounded) percentage of completed training sessions
      • getRunningUnits

        public List<RunningUnit> getRunningUnits()
        Get the (rounded) percentage of completed training sessions.
        Returns:
        The (rounded) percentage of completed training sessions
      • getDuration

        public long getDuration()
        The total duration of the training session in minutes, i.e. the sum of the individual training sections.
        Returns:
        Sum of the individual training sections in minutes
      • isCompleted

        public boolean isCompleted()
        Indicates whether the run plan entry (training day) has been completed. Is automatically true if all training sections are completed.
        Returns:
        A flag to determine if all units of entry completed
      • percentCompleted

        public int percentCompleted()
        (Rounded) percentage of run segments completed.
        Returns:
        Percentage of run segments completed
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class de.hirola.kintojava.model.KintoObject
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class de.hirola.kintojava.model.KintoObject