1package com.xtremelabs.robolectric.shadows;
2
3import static com.xtremelabs.robolectric.Robolectric.shadowOf_;
4
5import com.google.android.maps.GeoPoint;
6import com.google.android.maps.OverlayItem;
7import com.xtremelabs.robolectric.internal.Implementation;
8import com.xtremelabs.robolectric.internal.Implements;
9import com.xtremelabs.robolectric.util.Strings;
10
11@SuppressWarnings({"UnusedDeclaration"})
12@Implements(OverlayItem.class)
13public class ShadowOverlayItem {
14    private GeoPoint geoPoint;
15	private String title;
16	private String snippet;
17
18    public void __constructor__(GeoPoint geoPoint, String title, String snippet) {
19        this.geoPoint = geoPoint;
20		this.title = title;
21		this.snippet = snippet;
22    }
23
24    @Implementation
25    public GeoPoint getPoint() {
26        return geoPoint;
27    }
28
29    @Implementation
30    public String getTitle() {
31		return title;
32	}
33
34    @Implementation
35    public String getSnippet() {
36		return snippet;
37	}
38
39    @Override @Implementation
40    public boolean equals(Object o) {
41    	if (o == null) return false;
42        o = shadowOf_(o);
43        if (o == null) return false;
44        if (this == o) return true;
45        if (getClass() != o.getClass()) return false;
46
47        ShadowOverlayItem that = (ShadowOverlayItem) o;
48
49        return Strings.equals(title, that.title)
50        	&& Strings.equals(snippet, that.snippet)
51        	&& geoPoint == null ? that.geoPoint == null :
52        		geoPoint.equals(that.geoPoint);
53    }
54
55    @Override @Implementation
56    public int hashCode() {
57    	int result = 13;
58    	result = title == null ? result : 19 * result + title.hashCode();
59    	result = snippet == null ? result : 19 * result + snippet.hashCode();
60    	result = geoPoint == null ? result : 19 * result + geoPoint.hashCode();
61    	return result;
62    }
63}
64