KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > DirtyPerspectiveMarker


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal;
12
13 /**
14  * @since 3.1
15  */

16 public class DirtyPerspectiveMarker {
17     /**
18      * @param id
19      */

20     public DirtyPerspectiveMarker(String JavaDoc id) {
21         perspectiveId = id;
22     }
23
24     public String JavaDoc perspectiveId;
25     
26     /* (non-Javadoc)
27      * @see java.lang.Object#hashCode()
28      */

29     public int hashCode() {
30         return perspectiveId.hashCode();
31     }
32     
33     /* (non-Javadoc)
34      * @see java.lang.Object#equals(java.lang.Object)
35      */

36     public boolean equals(Object JavaDoc o) {
37         if (o instanceof DirtyPerspectiveMarker) {
38             return perspectiveId
39                     .equals(((DirtyPerspectiveMarker) o).perspectiveId);
40         }
41         return false;
42     }
43 }
44
Popular Tags