KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > pmd > rules > ImportWrapper


1 /**
2  * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3  */

4 package net.sourceforge.pmd.rules;
5
6 import net.sourceforge.pmd.ast.SimpleNode;
7
8 public class ImportWrapper {
9     private SimpleNode node;
10     private String JavaDoc name;
11     private String JavaDoc fullname;
12
13     public ImportWrapper(String JavaDoc fullname, String JavaDoc name, SimpleNode node) {
14         this.fullname = fullname;
15         this.name = name;
16         this.node = node;
17     }
18
19
20     public boolean equals(Object JavaDoc other) {
21         ImportWrapper i = (ImportWrapper) other;
22         return i.getName().equals(name);
23     }
24
25     public int hashCode() {
26         return getName().hashCode();
27     }
28
29     public String JavaDoc getName() {
30         return name;
31     }
32
33     public String JavaDoc getFullName() {
34         return fullname;
35     }
36
37     public SimpleNode getNode() {
38         return node;
39     }
40 }
41
42
Popular Tags