Class RunningUnit

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

    public class RunningUnit
    extends PersistentObject
    Copyright 2021 by Michael Schmidt, Hirola Consulting This software us licensed under the AGPL-3.0 or later. A single training unit as part of a training section within a running plan. The movement types can be adjusted and saved. Example: 20 min run
    Since:
    1.1.1
    Author:
    Michael Schmidt (Hirola)
    See Also:
    RunningPlanEntry
    • Constructor Detail

      • RunningUnit

        public RunningUnit()
        Default constructor for reflection.
      • RunningUnit

        public RunningUnit​(int duration,
                           MovementType movementType)
        Create a running unit of a plan entry.
        Parameters:
        duration - of the unit
        movementType - of the unit
    • Method Detail

      • getMovementType

        public MovementType getMovementType()
        Get the type of movement for the unit.
        Returns:
        Type of movement for the unit
      • setMovementType

        public void setMovementType​(MovementType movementType)
        Set the type of movement for the unit.
        Parameters:
        movementType - type of movement for the unit
      • isCompleted

        public boolean isCompleted()
        Get a flag to determine if unit is completed.
        Returns:
        A flag to determine if unit is completed
      • setCompleted

        public void setCompleted​(boolean completed)
        Set a flag to determine if unit is completed.
        Parameters:
        completed - A flag to determine if unit is completed
      • getDuration

        public long getDuration()
        Get the duration of the unit.
        Returns:
        The duration of the unit