Android Open Source - SimpleCardioLog Exercise

From Project

Back to project page SimpleCardioLog.


The source code is released under:

MIT License

If you think the Android project SimpleCardioLog listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.nomachetejuggling.scl.model;
/*w w  w  .j a v  m*/

public class Exercise implements Serializable, Comparable<Exercise> {
  public static final String UNITLESS="None";
  private static final long serialVersionUID = -848012361823465720L;
  public String name;
  public boolean favorite = false;
  public String units = UNITLESS;
  public String precision = null;

  public String toString() {
    return "CardioExercise("+name+"), Units: "+units+", Precision: "+precision;

  public int compareTo(Exercise other) {
    return name.trim().compareToIgnoreCase(;

  public void copyFrom(Exercise other) { =;
    this.favorite = other.favorite;
    this.units = other.units;
    this.precision = other.precision;

  public boolean isUnitless() {
    return units == null || units.equals(UNITLESS);

Java Source Code List