Android Open Source - SimpleCardioLog Exercise






From Project

Back to project page SimpleCardioLog.

License

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 a2s.co  m*/
import java.io.Serializable;

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;

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

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

  public void copyFrom(Exercise other) {
    this.name = other.name;
    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

com.nomachetejuggling.scl.AddActivity.java
com.nomachetejuggling.scl.ExerciseList.java
com.nomachetejuggling.scl.LogActivity.java
com.nomachetejuggling.scl.SettingsActivity.java
com.nomachetejuggling.scl.Tags.java
com.nomachetejuggling.scl.Util.java
com.nomachetejuggling.scl.model.Exercise.java
com.nomachetejuggling.scl.model.LogEntry.java