Repository navigation
Expand file tree
/
Copy pathTransfer.java
More file actions
180 lines (159 loc) · 3.32 KB
/
Copy pathTransfer.java
File metadata and controls
180 lines (159 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
package jota.model;
import com.google.gson.Gson;
/**
* This class represents a Transfer.
*
* @author pinpong
*/
public class Transfer {
private String timestamp;
private String address;
private String hash;
private Boolean persistence;
private long value;
private String message;
private String tag;
/**
* Initializes a new instance of the Transfer class.
*/
public Transfer(String timestamp, String address, String hash, Boolean persistence, long value, String message,
String tag) {
this.timestamp = timestamp;
this.address = address;
this.hash = hash;
this.persistence = persistence;
this.value = value;
this.message = message;
this.tag = tag;
}
/**
* Initializes a new instance of the Transfer class.
*/
public Transfer(String address, long value, String message, String tag) {
this.address = address;
this.value = value;
this.message = message;
this.tag = tag;
}
/**
* Returns a Json Object that represents this object.
*
* @return Returns a string representation of this object.
*/
@Override
public String toString() {
return new Gson().toJson(this);
}
/**
* Get the address.
*
* @return The address.
*/
public String getAddress() {
return address;
}
/**
* Set the address.
*
* @param address The address.
*/
public void setAddress(String address) {
this.address = address;
}
/**
* Get the hash.
*
* @return The hash.
*/
public String getHash() {
return hash;
}
/**
* Set the hash.
*
* @param hash The hash.
*/
public void setHash(String hash) {
this.hash = hash;
}
/**
* Get the persistence.
*
* @return The persistence.
*/
public Boolean getPersistence() {
return persistence;
}
/**
* Set the persistence.
*
* @param persistence The persistence.
*/
public void setPersistence(Boolean persistence) {
this.persistence = persistence;
}
/**
* Get the timestamp.
*
* @return The timestamp.
*/
public String getTimestamp() {
return timestamp;
}
/**
* Set the timestamp.
*
* @param timestamp The timestamp.
*/
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
/**
* Get the value.
*
* @return The value.
*/
public long getValue() {
return value;
}
/**
* Set the value.
*
* @param value The value.
*/
public void setValue(long value) {
this.value = value;
}
/**
* Get the message.
*
* @return The message.
*/
public String getMessage() {
return message;
}
/**
* Set the message.
*
* @param message The message.
*/
public void setMessage(String message) {
this.message = message;
}
/**
* Get the tag.
*
* @return The tag.
*/
public String getTag() {
return tag;
}
/**
* Set the tag.
*
* @param tag The tag.
*/
public void setTag(String tag) {
this.tag = tag;
}
}