Class Training

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

    public class Training
    extends PersistentObject
    Copyright 2021 by Michael Schmidt, Hirola Consulting This software us licensed under the AGPL-3.0 or later. A training session with the bike, the tour is imported as a GPX using an existing recording, saved as a route and visualized with MapKit. The user can store additional information for each training session.
    Since:
    1.1.1
    Author:
    Michael Schmidt (Hirola)
    • Constructor Detail

      • Training

        public Training()
        Default constructor for import from json.
      • Training

        public Training​(@NotNull
                        @NotNull String name,
                        @Nullable
                        @Nullable String remarks,
                        @Nullable
                        @Nullable TrainingType trainingType,
                        @NotNull
                        @NotNull Track track,
                        @Nullable
                        @Nullable java.time.LocalDate trainingDate)
      • Training

        public Training​(@NotNull
                        @NotNull String name,
                        @Nullable
                        @Nullable String remarks,
                        @Nullable
                        @Nullable TrainingType trainingType,
                        @Nullable
                        @Nullable java.time.LocalDate trainingDate,
                        @Nullable
                        @Nullable Track track,
                        double distance,
                        double averageSpeed,
                        double altitudeDifference)
    • Method Detail

      • getName

        public String getName()
        Get the name of the training.
        Returns:
        The name of training
      • setName

        public void setName​(String name)
        Set the name of the training.
        Parameters:
        name - of the training
      • getRemarks

        public String getRemarks()
        Get the remarks of the training.
        Returns:
        The remarks of training
      • setRemarks

        public void setRemarks​(String remarks)
        Set the remarks of the training.
        Parameters:
        remarks - of the training
      • getTrainingType

        public TrainingType getTrainingType()
        Get the type of the training.
        Returns:
        The type of training
      • setTrainingType

        public void setTrainingType​(TrainingType trainingType)
        Set the type of the training.
        Parameters:
        trainingType - of the training
      • getTrainingDate

        public java.time.LocalDate getTrainingDate()
        Get the date of the training.
        Returns:
        The date of training
      • setTrainingDate

        public void setTrainingDate​(java.time.LocalDate trainingDate)
        Set the date of the training.
        Parameters:
        trainingDate - of the training
      • getTrack

        @Nullable
        public @Nullable Track getTrack()
        Get the track of the training.
        Returns:
        The track of training, can be null
      • setTrack

        public void setTrack​(Track track)
        Set the track of the training.
        Parameters:
        track - of the training
      • getDuration

        public long getDuration()
        Get the duration of the training.
        Returns:
        The duration of training in minutes
      • setDuration

        public void setDuration​(int duration)
        Set the duration of the training.
        Parameters:
        duration - of the training in minutes
      • getDistance

        public double getDistance()
        Get the distance of the training.
        Returns:
        The distance of training in meters
      • setDistance

        public void setDistance​(double distance)
        Set the distance of the training.
        Parameters:
        distance - of the training in meters
      • getAltitudeDifference

        public double getAltitudeDifference()
        Get the name of the training.
        Returns:
        The altitude difference of training in meters
      • setAltitudeDifference

        public void setAltitudeDifference​(double altitudeDifference)
        Set the altitude difference of training.
        Parameters:
        altitudeDifference - of training in meters
      • getAverageSpeed

        public double getAverageSpeed()
        Get the average speed of the training.
        Returns:
        The average speed of training in km/h
      • setAverageSpeed

        public void setAverageSpeed​(double averageSpeed)
        Set the average speed of the training.
        Parameters:
        averageSpeed - of the training in km/h
      • 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