NbjMapItem.java :  » App » nbj » fr » nbj » appli » Android Open Source

Android Open Source » App » nbj 
nbj » fr » nbj » appli » NbjMapItem.java
package fr.nbj.appli;

import android.graphics.drawable.Drawable;
import android.os.Bundle;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.OverlayItem;

public class NbjMapItem extends OverlayItem{

  protected int id;
  protected int num;
  protected String description;
  //protected Bundle placeBundle;

  NbjMapItem(int id, int num, GeoPoint point, String title, String snippet, String descr/*, Bundle placeBundle*/){
    super(point, title, snippet);
    this.id = id;
    this.description = descr;
    this.num = num;
    //this.placeBundle = placeBundle;
  }

  @Override
  public Drawable getMarker(int stateBitset) {
    // TODO Auto-generated method stub
    return super.getMarker(stateBitset);
  }
  
  @Override
  public String toString() {
    return"[id="+id+" ,title="+getTitle()+" ,num="+num;
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + id;
    result = prime * result + num;
    return result;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    NbjMapItem other = (NbjMapItem) obj;
    if (id != other.id)
      return false;
    if (num != other.num)
      return false;
    return true;
  }
  
  
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.