mirror of
https://codeberg.org/anoncontributorxmr/mysu.git
synced 2025-03-10 07:29:42 -06:00
Get rid of lombok
This commit is contained in:
parent
7268b07c6c
commit
186b63044a
@ -162,7 +162,4 @@ dependencies {
|
|||||||
testImplementation "com.squareup.okhttp3:mockwebserver:4.9.3"
|
testImplementation "com.squareup.okhttp3:mockwebserver:4.9.3"
|
||||||
testImplementation 'org.json:json:20211205'
|
testImplementation 'org.json:json:20211205'
|
||||||
testImplementation 'net.jodah:concurrentunit:0.4.6'
|
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.URLEncoder;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import timber.log.Timber;
|
import timber.log.Timber;
|
||||||
|
|
||||||
public class Node {
|
public class Node {
|
||||||
@ -36,29 +34,33 @@ public class Node {
|
|||||||
static public final String TESTNET = "testnet";
|
static public final String TESTNET = "testnet";
|
||||||
static private int DEFAULT_LEVIN_PORT = 0;
|
static private int DEFAULT_LEVIN_PORT = 0;
|
||||||
static private int DEFAULT_RPC_PORT = 0;
|
static private int DEFAULT_RPC_PORT = 0;
|
||||||
@Getter
|
|
||||||
final private NetworkType networkType;
|
final private NetworkType networkType;
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
private final boolean selected = false;
|
private final boolean selected = false;
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
int rpcPort = 0;
|
int rpcPort = 0;
|
||||||
@Getter
|
|
||||||
private String name = null;
|
private String name = null;
|
||||||
@Getter
|
|
||||||
private String host;
|
private String host;
|
||||||
private int levinPort = 0;
|
private int levinPort = 0;
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
private String username = "";
|
private String username = "";
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
private String password = "";
|
private String password = "";
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
private boolean favourite = false;
|
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) {
|
Node(String nodeString) {
|
||||||
if ((nodeString == null) || nodeString.isEmpty())
|
if ((nodeString == null) || nodeString.isEmpty())
|
||||||
throw new IllegalArgumentException("daemon is empty");
|
throw new IllegalArgumentException("daemon is empty");
|
||||||
|
@ -18,29 +18,21 @@ package net.mynero.wallet.data;
|
|||||||
|
|
||||||
import java.util.regex.Pattern;
|
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 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}$");
|
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;
|
final private int accountIndex;
|
||||||
@Getter
|
|
||||||
final private int addressIndex;
|
final private int addressIndex;
|
||||||
@Getter
|
|
||||||
final private String address;
|
final private String address;
|
||||||
@Getter
|
|
||||||
private final String label;
|
private final String label;
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
private long amount;
|
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
|
@Override
|
||||||
public int compareTo(Subaddress another) { // newer is <
|
public int compareTo(Subaddress another) { // newer is <
|
||||||
final int compareAccountIndex = another.accountIndex - accountIndex;
|
final int compareAccountIndex = another.accountIndex - accountIndex;
|
||||||
@ -59,4 +51,28 @@ public class Subaddress implements Comparable<Subaddress> {
|
|||||||
else
|
else
|
||||||
return label;
|
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 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 not the TransactionInfo from the API as that is owned by the TransactionHistory
|
||||||
// this is a POJO for the TransactionInfoAdapter
|
// this is a POJO for the TransactionInfoAdapter
|
||||||
public class TransactionInfo implements Parcelable, Comparable<TransactionInfo> {
|
public class TransactionInfo implements Parcelable, Comparable<TransactionInfo> {
|
||||||
@ -163,14 +160,20 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public enum Direction {
|
public enum Direction {
|
||||||
Direction_In(0),
|
Direction_In(0),
|
||||||
Direction_Out(1);
|
Direction_Out(1);
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final int value;
|
private final int value;
|
||||||
|
|
||||||
|
Direction(int value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
public static Direction fromInteger(int n) {
|
public static Direction fromInteger(int n) {
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -31,8 +31,6 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import timber.log.Timber;
|
import timber.log.Timber;
|
||||||
|
|
||||||
public class Wallet {
|
public class Wallet {
|
||||||
@ -460,14 +458,25 @@ public class Wallet {
|
|||||||
|
|
||||||
private native int getDeviceTypeJ();
|
private native int getDeviceTypeJ();
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Getter
|
|
||||||
public enum Device {
|
public enum Device {
|
||||||
Device_Undefined(0, 0),
|
Device_Undefined(0, 0),
|
||||||
Device_Software(50, 200),
|
Device_Software(50, 200),
|
||||||
Device_Ledger(5, 20);
|
Device_Ledger(5, 20);
|
||||||
private final int accountLookahead;
|
private final int accountLookahead;
|
||||||
private final int subaddressLookahead;
|
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 {
|
public enum StatusEnum {
|
||||||
|
@ -25,7 +25,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import timber.log.Timber;
|
import timber.log.Timber;
|
||||||
|
|
||||||
public class WalletManager {
|
public class WalletManager {
|
||||||
@ -325,9 +324,7 @@ public class WalletManager {
|
|||||||
public native boolean setProxyJ(String address);
|
public native boolean setProxyJ(String address);
|
||||||
|
|
||||||
public class WalletInfo implements Comparable<WalletInfo> {
|
public class WalletInfo implements Comparable<WalletInfo> {
|
||||||
@Getter
|
|
||||||
final private File path;
|
final private File path;
|
||||||
@Getter
|
|
||||||
final private String name;
|
final private String name;
|
||||||
|
|
||||||
public WalletInfo(File wallet) {
|
public WalletInfo(File wallet) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user