Starsector API
Loading...
Searching...
No Matches
SpecialItemData.java
Go to the documentation of this file.
1package com.fs.starfarer.api.campaign;
2
3
4public class SpecialItemData {
5 private String id;
6 private String data;
7
8 public SpecialItemData(String id, String data) {
9 this.id = id;
10 this.data = data;
11 }
12
13 public String getId() {
14 return id;
15 }
16
17 public String getData() {
18 return data;
19 }
20
21 public void setData(String data) {
22 this.data = data;
23 }
24
25 @Override
26 public int hashCode() {
27 final int prime = 31;
28 int result = 1;
29 result = prime * result + ((data == null) ? 0 : data.hashCode());
30 result = prime * result + ((id == null) ? 0 : id.hashCode());
31 return result;
32 }
33
34 @Override
35 public boolean equals(Object obj) {
36 if (this == obj)
37 return true;
38 if (obj == null)
39 return false;
40 if (getClass() != obj.getClass())
41 return false;
42 SpecialItemData other = (SpecialItemData) obj;
43 if (data == null) {
44 if (other.data != null)
45 return false;
46 } else if (!data.equals(other.data))
47 return false;
48 if (id == null) {
49 if (other.id != null)
50 return false;
51 } else if (!id.equals(other.id))
52 return false;
53 return true;
54 }
55
56
57}