mirror of
https://github.com/DanielPollithy/flashwifi.git
synced 2025-10-16 11:45:32 +00:00
Updated transfers to use iota implementation
This commit is contained in:
parent
3aa57962bf
commit
446921b368
@ -5,48 +5,30 @@ import com.google.gson.Gson;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Transfer {
|
||||
public class Transfer extends jota.model.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;
|
||||
super(timestamp, address, hash, persistence,value,message,tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new instance of the Transfer class.
|
||||
*/
|
||||
public Transfer(String address, long value) {
|
||||
this.address = address;
|
||||
this.value = value;
|
||||
this.message = "";
|
||||
this.tag = "";
|
||||
super(address, value);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
super(address, value, message, tag);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -59,132 +41,6 @@ public class Transfer {
|
||||
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 in seconds.
|
||||
*/
|
||||
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 trytes encoded.
|
||||
*/
|
||||
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 max 27 trytes encoded.
|
||||
*/
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public Map<String, Object> toMap() {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("timestamp", getTimestamp());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user