mirror of
https://github.com/gosticks/iota.lib.java.git
synced 2026-08-23 01:10:26 +00:00
Implemented prepareTransfer and getInputs
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package jota.model;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
/**
|
||||
* Created by pinpong on 02.12.16.
|
||||
@@ -11,21 +10,33 @@ public class Transfer {
|
||||
private String timestamp;
|
||||
private String address;
|
||||
private String hash;
|
||||
private Integer persistence;
|
||||
private Boolean persistence;
|
||||
private long value;
|
||||
private String message;
|
||||
private String tag;
|
||||
|
||||
public Transfer(String timestamp, String address, String hash, Integer persistence, long value) {
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
public Transfer(String address, long value, String message, String tag) {
|
||||
this.address = address;
|
||||
this.value = value;
|
||||
this.message = message;
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
|
||||
return new Gson().toJson(this);
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
@@ -36,7 +47,7 @@ public class Transfer {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public Integer getPersistence() {
|
||||
public Boolean getPersistence() {
|
||||
return persistence;
|
||||
}
|
||||
|
||||
@@ -47,4 +58,40 @@ public class Transfer {
|
||||
public long getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public void setTimestamp(String timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public void setHash(String hash) {
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
public void setPersistence(Boolean persistence) {
|
||||
this.persistence = persistence;
|
||||
}
|
||||
|
||||
public void setValue(long value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user