From 9baf087e9b6033b365e472e6fdd230283a200774 Mon Sep 17 00:00:00 2001 From: lado Date: Sun, 13 Nov 2011 01:48:03 +0100 Subject: equlas and hashcode --- vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'vdrmanager/src/de') diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java index bb2ceee..15f8552 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java @@ -104,4 +104,17 @@ public class Channel implements Parcelable { return new Channel[size]; } }; + + public boolean equals(Object o) { + if(o instanceof Channel == false){ + return false; + } + return number == ((Channel)o).getNumber(); + }; + + @Override + public int hashCode() { + return number; + } + } -- cgit v1.2.3