mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-09 15:50:00 +00:00
Get rid of lombok
This commit is contained in:
parent
7268b07c6c
commit
186b63044a
6 changed files with 69 additions and 45 deletions
|
@ -162,7 +162,4 @@ dependencies {
|
|||
testImplementation "com.squareup.okhttp3:mockwebserver:4.9.3"
|
||||
testImplementation 'org.json:json:20211205'
|
||||
testImplementation 'net.jodah:concurrentunit:0.4.6'
|
||||
|
||||
compileOnly 'org.projectlombok:lombok:1.18.22'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||
}
|
||||
|
|
|
@ -26,8 +26,6 @@ import java.net.URLDecoder;
|
|||
import java.net.URLEncoder;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import timber.log.Timber;
|
||||
|
||||
public class Node {
|
||||
|
@ -36,29 +34,33 @@ public class Node {
|
|||
static public final String TESTNET = "testnet";
|
||||
static private int DEFAULT_LEVIN_PORT = 0;
|
||||
static private int DEFAULT_RPC_PORT = 0;
|
||||
@Getter
|
||||
final private NetworkType networkType;
|
||||
@Getter
|
||||
@Setter
|
||||
private final boolean selected = false;
|
||||
@Getter
|
||||
@Setter
|
||||
int rpcPort = 0;
|
||||
@Getter
|
||||
private String name = null;
|
||||
@Getter
|
||||
private String host;
|
||||
private int levinPort = 0;
|
||||
@Getter
|
||||
@Setter
|
||||
private String username = "";
|
||||
@Getter
|
||||
@Setter
|
||||
private String password = "";
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean favourite = false;
|
||||
|
||||
|
||||
public NetworkType getNetworkType() {
|
||||
return networkType;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return this.username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return this.password;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
Node(String nodeString) {
|
||||
if ((nodeString == null) || nodeString.isEmpty())
|
||||
throw new IllegalArgumentException("daemon is empty");
|
||||
|
|
|
@ -18,29 +18,21 @@ package net.mynero.wallet.data;
|
|||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
public class Subaddress implements Comparable<Subaddress> {
|
||||
public static final Pattern DEFAULT_LABEL_FORMATTER = Pattern.compile("^[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{2}:[0-9]{2}:[0-9]{2}$");
|
||||
@Getter
|
||||
final private int accountIndex;
|
||||
@Getter
|
||||
final private int addressIndex;
|
||||
@Getter
|
||||
final private String address;
|
||||
@Getter
|
||||
private final String label;
|
||||
@Getter
|
||||
@Setter
|
||||
private long amount;
|
||||
|
||||
public Subaddress(int accountIndex, int addressIndex, String address, String label) {
|
||||
this.accountIndex = accountIndex;
|
||||
this.addressIndex = addressIndex;
|
||||
this.address = address;
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Subaddress another) { // newer is <
|
||||
final int compareAccountIndex = another.accountIndex - accountIndex;
|
||||
|
@ -59,4 +51,28 @@ public class Subaddress implements Comparable<Subaddress> {
|
|||
else
|
||||
return label;
|
||||
}
|
||||
|
||||
public long getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public int getAccountIndex() {
|
||||
return accountIndex;
|
||||
}
|
||||
|
||||
public int getAddressIndex() {
|
||||
return addressIndex;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setAmount(long amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,9 +23,6 @@ import net.mynero.wallet.data.Subaddress;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
// this is not the TransactionInfo from the API as that is owned by the TransactionHistory
|
||||
// this is a POJO for the TransactionInfoAdapter
|
||||
public class TransactionInfo implements Parcelable, Comparable<TransactionInfo> {
|
||||
|
@ -163,14 +160,20 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
|
|||
}
|
||||
}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public enum Direction {
|
||||
Direction_In(0),
|
||||
Direction_Out(1);
|
||||
|
||||
@Getter
|
||||
private final int value;
|
||||
|
||||
Direction(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Direction fromInteger(int n) {
|
||||
switch (n) {
|
||||
case 0:
|
||||
|
|
|
@ -31,8 +31,6 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import timber.log.Timber;
|
||||
|
||||
public class Wallet {
|
||||
|
@ -460,14 +458,25 @@ public class Wallet {
|
|||
|
||||
private native int getDeviceTypeJ();
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum Device {
|
||||
Device_Undefined(0, 0),
|
||||
Device_Software(50, 200),
|
||||
Device_Ledger(5, 20);
|
||||
private final int accountLookahead;
|
||||
private final int subaddressLookahead;
|
||||
|
||||
Device(int accountLookahead, int subaddressLookahead) {
|
||||
this.accountLookahead = accountLookahead;
|
||||
this.subaddressLookahead = subaddressLookahead;
|
||||
}
|
||||
|
||||
public int getAccountLookahead() {
|
||||
return accountLookahead;
|
||||
}
|
||||
|
||||
public int getSubaddressLookahead() {
|
||||
return subaddressLookahead;
|
||||
}
|
||||
}
|
||||
|
||||
public enum StatusEnum {
|
||||
|
|
|
@ -25,7 +25,6 @@ import java.util.ArrayList;
|
|||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import timber.log.Timber;
|
||||
|
||||
public class WalletManager {
|
||||
|
@ -325,9 +324,7 @@ public class WalletManager {
|
|||
public native boolean setProxyJ(String address);
|
||||
|
||||
public class WalletInfo implements Comparable<WalletInfo> {
|
||||
@Getter
|
||||
final private File path;
|
||||
@Getter
|
||||
final private String name;
|
||||
|
||||
public WalletInfo(File wallet) {
|
||||
|
|
Loading…
Reference in a new issue