src/main/java/de/uapcore/lightpit/ResourceKey.java

changeset 44
835dd169642a
parent 34
824d4042c857
equal deleted inserted replaced
43:9abf0bf44c7b 44:835dd169642a
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 * 27 *
28 */ 28 */
29 package de.uapcore.lightpit; 29 package de.uapcore.lightpit;
30 30
31 import java.util.Objects;
32
31 /** 33 /**
32 * Fully specifies a resource key by the bundle and the key name. 34 * Fully specifies a resource key by the bundle and the key name.
33 */ 35 */
34 public final class ResourceKey { 36 public final class ResourceKey {
35 private String bundle; 37 private String bundle;
36 private String key; 38 private String key;
37
38 public ResourceKey() {
39
40 }
41 39
42 public ResourceKey(String bundle, String key) { 40 public ResourceKey(String bundle, String key) {
43 this.bundle = bundle; 41 this.bundle = bundle;
44 this.key = key; 42 this.key = key;
45 } 43 }
57 } 55 }
58 56
59 public String getKey() { 57 public String getKey() {
60 return key; 58 return key;
61 } 59 }
60
61 @Override
62 public boolean equals(Object o) {
63 if (this == o) return true;
64 if (o == null || getClass() != o.getClass()) return false;
65 ResourceKey that = (ResourceKey) o;
66 return bundle.equals(that.bundle) &&
67 key.equals(that.key);
68 }
69
70 @Override
71 public int hashCode() {
72 return Objects.hash(bundle, key);
73 }
62 } 74 }

mercurial