/[projects]/android/Side9/src/dk/thoerup/side9/Side9Data.java
ViewVC logotype

Contents of /android/Side9/src/dk/thoerup/side9/Side9Data.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1225 - (show annotations) (download)
Wed Feb 9 17:50:24 2011 UTC (13 years, 3 months ago) by torben
File size: 554 byte(s)
Use both url AND caption as equality parameters
1 package dk.thoerup.side9;
2
3 public class Side9Data {
4 public String url;
5
6 public int width;
7 public int height;
8 public String caption = "";
9
10
11
12
13 @Override
14 public boolean equals(Object o) {
15 if (o == null)
16 return false;
17 if (! (o instanceof Side9Data) )
18 return false;
19
20 Side9Data data = (Side9Data) o;
21 return (this.url.equals( data.url ) && this.caption.equals(data.caption) );
22
23 }
24
25 public String getFilename() {
26 String parts[] = url.split("/");
27 return parts[ parts.length - 1];
28
29 }
30
31
32 }
33

  ViewVC Help
Powered by ViewVC 1.1.20