1
2
3
4 package joeq.Class;
5
6 import joeq.UTF.Utf8;
7
8
9
10
11
12 public class jq_NameAndDesc {
13
14 private final Utf8 name, desc;
15
16 /*** Creates new jq_NameAndDesc */
17 public jq_NameAndDesc(Utf8 name, Utf8 desc) {
18 this.name = name;
19 this.desc = desc;
20 }
21 public jq_NameAndDesc(String name, String desc) {
22 this(Utf8.get(name), Utf8.get(desc));
23 }
24
25 public final Utf8 getName() { return name; }
26 public final Utf8 getDesc() { return desc; }
27
28 public boolean equals(Object o) { return equals((jq_NameAndDesc)o); }
29 public boolean equals(jq_NameAndDesc that) {
30 return this.name == that.name && this.desc == that.desc;
31 }
32 public int hashCode() {
33 return name.hashCode() ^ desc.hashCode();
34 }
35 public String toString() {
36 return name+" "+desc;
37 }
38
39 }