worker data class

This commit is contained in:
Nicolás Sánchez 2024-12-16 16:49:17 -03:00
parent b37cdb336c
commit 5c2c8dbc68
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,49 @@
package com.example.dcav2gui.ui.exchanges;
import com.example.dcav2gui.InstanceInterface;
public class WorkerData {
private final String pair;
private final int amountOfSafetyOrders;
private final int maxSafetyOrders;
private final double uptime;
private final double nextSoPrice;
private final double price;
private final double takeProfitPrice;
private final boolean isShort;
private final boolean isBoosted;
private final boolean isAuto;
private final boolean isPaused;
private final InstanceInterface.OldLongDictionary oldLongDictionary;
public WorkerData(String pair, int amountOfSafetyOrders, int maxSafetyOrders, double uptime,
double nextSoPrice, double price, double takeProfitPrice, boolean isShort,
boolean isBoosted, boolean isAuto, boolean isPaused,
InstanceInterface.OldLongDictionary oldLongDictionary) {
this.pair = pair;
this.amountOfSafetyOrders = amountOfSafetyOrders;
this.maxSafetyOrders = maxSafetyOrders;
this.uptime = uptime;
this.nextSoPrice = nextSoPrice;
this.price = price;
this.takeProfitPrice = takeProfitPrice;
this.isShort = isShort;
this.isBoosted = isBoosted;
this.isAuto = isAuto;
this.isPaused = isPaused;
this.oldLongDictionary = oldLongDictionary;
}
public String getPair() { return pair; }
public int getAmountOfSafetyOrders() { return amountOfSafetyOrders; }
public int getMaxSafetyOrders() { return maxSafetyOrders; }
public double getUptime() { return uptime; }
public double getNextSoPrice() { return nextSoPrice; }
public double getPrice() { return price; }
public double getTakeProfitPrice() { return takeProfitPrice; }
public boolean isShort() { return isShort; }
public boolean isBoosted() { return isBoosted; }
public boolean isAuto() { return isAuto; }
public boolean isPaused() { return isPaused; }
public InstanceInterface.OldLongDictionary getOldLongDictionary() { return oldLongDictionary; }
}

View File

@ -51,6 +51,7 @@
android:textAlignment="center"
android:textSize="12sp" />
<TextView
android:id="@+id/workerCardStatusString"
android:layout_width="46dp"
android:layout_height="24dp"
android:text="LAST DEAL"
@ -63,6 +64,7 @@
android:layout_width="20dp"
android:layout_height="24dp"
android:src="@drawable/ic_flame"
android:visibility="visible"
/>
</LinearLayout>
<LinearLayout