Android Open Source - HereIAm Here Route






From Project

Back to project page HereIAm.

License

The source code is released under:

GNU General Public License

If you think the Android project HereIAm 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 cl.mamd.here.entity;
// ww w . j  a  v  a2 s . c  om
import java.util.HashMap;
import java.util.Map;

public class HereRoute {
  private Integer id;
  private String name;
  private Map<Integer,HerePoint> route;
  
  /**
   *
   */
  public HereRoute(){
    super();
    this.route = new HashMap<Integer,HerePoint>();
  }
  
  public HereRoute(Integer id, String name, Map<Integer,HerePoint> route) {
    super();
    this.id = id;
    this.name = name;
    this.route = route;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Map<Integer,HerePoint> getRoute() {
    return route;
  }

  public void setRoute(Map<Integer,HerePoint> route) {
    this.route = route;
  }
  
  public boolean addPointToRoute(HerePoint point){
    Integer maxsize = this.route.keySet().size();
    maxsize++;
    if ( this.route.put(maxsize, point) != null){
      return true;
    }
    else {
      return false;
    }
  }

}




Java Source Code List

cl.mamd.here.MainActivity.java
cl.mamd.here.entity.HerePoint.java
cl.mamd.here.entity.HereRoute.java