diff options
author | Christopher Baines <cbaines8@gmail.com> | 2012-01-24 23:03:08 +0000 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2012-01-24 23:03:08 +0000 |
commit | efb193d6fbea2423d03eebf30e2359a6612134c1 (patch) | |
tree | 4dc77e89cae8c8154b6646583035492675eb21d4 /src/net/cbaines/suma/BusRoute.java | |
parent | f13680dc5ca55401484ea23fc9493a938cb8ae73 (diff) | |
download | southamptonuniversitymap-efb193d6fbea2423d03eebf30e2359a6612134c1.tar southamptonuniversitymap-efb193d6fbea2423d03eebf30e2359a6612134c1.tar.gz |
Many changes, began working on implementing filtering and route navigation within BusTimeActivity.
Diffstat (limited to 'src/net/cbaines/suma/BusRoute.java')
-rw-r--r-- | src/net/cbaines/suma/BusRoute.java | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/net/cbaines/suma/BusRoute.java b/src/net/cbaines/suma/BusRoute.java index 016f3bd..43a5375 100644 --- a/src/net/cbaines/suma/BusRoute.java +++ b/src/net/cbaines/suma/BusRoute.java @@ -48,10 +48,10 @@ public class BusRoute { private static final String TAG = "BusRoute"; @DatabaseField(id = true) - int id; + public int id; @DatabaseField - String code; + public String code; @DatabaseField String label; @@ -59,7 +59,7 @@ public class BusRoute { BusRoute() { } - BusRoute(Integer id, String code, String label) { + public BusRoute(Integer id, String code, String label) { this.id = id.intValue(); this.code = code; this.label = label; @@ -183,4 +183,26 @@ public class BusRoute { } } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + id; + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + BusRoute other = (BusRoute) obj; + if (id != other.id) + return false; + return true; + } + } |