bitch please

This commit is contained in:
AZ
2016-12-09 18:43:19 +01:00
parent e60d78a619
commit ef915201da
2 changed files with 76 additions and 2 deletions
+59
View File
@@ -0,0 +1,59 @@
package jota.model;
import org.apache.commons.lang3.NotImplementedException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* Created by pinpong on 09.12.16.
*/
public class Bundle {
private List<Transaction> transactions;
private int length;
public Bundle() {
this(new ArrayList<Transaction>(), 0);
}
public Bundle(List<Transaction> transactions, int length) {
this.transactions = transactions;
this.length = length;
}
public List<Transaction> getTransactions() {
return transactions;
}
public void setTransactions(List<Transaction> transactions) {
this.transactions = transactions;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public void addEntry(int signatureMessageLength, String slice, long value, String tag, long timestamp) {
throw new NotImplementedException("");
}
public void finalize() {
throw new NotImplementedException("");
}
public void addTrytes(List<String> signatureFragments) {
throw new NotImplementedException("");
}
public String normalizedBundle(String bundleHash) {
throw new NotImplementedException("");
}
}
+17 -2
View File
@@ -1,5 +1,6 @@
package jota.model;
import com.google.gson.Gson;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -13,19 +14,24 @@ public class Transfer {
private String hash;
private Integer 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, Integer 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;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return new Gson().toJson(this);
}
public String getAddress() {
@@ -47,4 +53,13 @@ public class Transfer {
public long getValue() {
return value;
}
public String getMessage() {
return message;
}
public String getTag() {
return tag;
}
}