root / trunk / extensions / extQuickInfo / src / org / gvsig / quickInfo / GeometryIDInfo.java @ 27817
History | View | Annotate | Download (1.8 KB)
1 |
package org.gvsig.quickInfo; |
---|---|
2 |
|
3 |
/* gvSIG. Geographic Information System of the Valencian Government
|
4 |
*
|
5 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
6 |
* of the Valencian Government (CIT)
|
7 |
*
|
8 |
* This program is free software; you can redistribute it and/or
|
9 |
* modify it under the terms of the GNU General Public License
|
10 |
* as published by the Free Software Foundation; either version 2
|
11 |
* of the License, or (at your option) any later version.
|
12 |
*
|
13 |
* This program is distributed in the hope that it will be useful,
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16 |
* GNU General Public License for more details.
|
17 |
*
|
18 |
* You should have received a copy of the GNU General Public License
|
19 |
* along with this program; if not, write to the Free Software
|
20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
21 |
* MA 02110-1301, USA.
|
22 |
*
|
23 |
*/
|
24 |
|
25 |
/**
|
26 |
*
|
27 |
*
|
28 |
* @author Pablo Piqueras Bartolom? (pablo.piqueras@iver.es)
|
29 |
*/
|
30 |
public class GeometryIDInfo { // implements Comparable, Comparator { |
31 |
private String id; |
32 |
private boolean hasInfo; |
33 |
|
34 |
public GeometryIDInfo(String id) { |
35 |
this.id = id;
|
36 |
hasInfo = true; // by default has info |
37 |
} |
38 |
|
39 |
public GeometryIDInfo(String id, boolean hasInfo) { |
40 |
this.id = id;
|
41 |
this.hasInfo = hasInfo;
|
42 |
} |
43 |
|
44 |
public String getID() { |
45 |
return id;
|
46 |
} |
47 |
|
48 |
public boolean hasInfo() { |
49 |
return hasInfo;
|
50 |
} |
51 |
|
52 |
public void setHasInfo(boolean b) { |
53 |
hasInfo = b; |
54 |
} |
55 |
//
|
56 |
// public int compareTo(Object arg0) {
|
57 |
// return id.compareTo((String)arg0);
|
58 |
// }
|
59 |
//
|
60 |
// public int compare(Object arg0, Object arg1) {
|
61 |
// return ((String)arg0.toString()).compareTo((String)arg1.toString());
|
62 |
// }
|
63 |
|
64 |
public String toString() { |
65 |
return id;
|
66 |
} |
67 |
|
68 |
public boolean equals(GeometryIDInfo obj) { |
69 |
return id.compareTo(obj.toString()) == 0; |
70 |
} |
71 |
} |