Workaround for feature request #1154254 (sticky browser URL) that solves bug #1827766...
[phpeclipse.git] / net.sourceforge.phpeclipse.webbrowser / src / net / sourceforge / phpeclipse / webbrowser / internal / Favorite.java
1 /**
2  * Copyright (c) 2003 IBM Corporation and others.
3  * All rights reserved. � This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  �*
8  * Contributors:
9  *    IBM - Initial API and implementation
10  */
11 package net.sourceforge.phpeclipse.webbrowser.internal;
12
13 /**
14  * 
15  */
16 public class Favorite {
17         protected String url;
18
19         protected String name;
20
21         public Favorite() {
22         }
23
24         public Favorite(String name, String url) {
25                 if (name == null)
26                         name = "";
27                 if (url == null)
28                         url = "";
29                 this.name = name;
30                 this.url = url;
31         }
32
33         public String getName() {
34                 return name;
35         }
36
37         public void setName(String name) {
38                 this.name = name;
39         }
40
41         public String getURL() {
42                 return url;
43         }
44
45         public void setURL(String url) {
46                 this.url = url;
47         }
48
49         public boolean equals(Object obj) {
50                 if (!(obj instanceof Favorite))
51                         return false;
52
53                 Favorite f = (Favorite) obj;
54                 return (name.equals(f.name) && url.equals(f.url));
55         }
56
57         public String toString() {
58                 return "(" + name + "/" + url + ")";
59         }
60 }