public class TerminalData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
batteryLevel |
private boolean |
charging |
private static TerminalData |
instance
The private instance of this singleton class.
|
private double |
latitude |
private double |
longitude |
private java.lang.String |
manufacturer |
private java.lang.String |
model |
private java.lang.String |
version |
Modifier | Constructor and Description |
---|---|
private |
TerminalData()
Private constructor that initiates the values.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
int |
getBatteryLevel() |
static TerminalData |
getInstance()
Creates the unique object of this class if not created.
|
double |
getLatitude() |
double |
getLongitude() |
java.lang.String |
getManufacturer() |
java.lang.String |
getModel() |
java.lang.String |
getVersion() |
boolean |
isCharging() |
void |
setBatteryLevel(int batteryLevel) |
void |
setCharging(boolean charging) |
void |
setLatitude(double latitude) |
void |
setLongitude(double longitude) |
java.lang.String |
toString() |
private static TerminalData instance
private java.lang.String model
private java.lang.String manufacturer
private java.lang.String version
private double latitude
private double longitude
private int batteryLevel
private boolean charging
private TerminalData()
public static TerminalData getInstance()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.String getModel()
public java.lang.String getManufacturer()
public java.lang.String getVersion()
public int getBatteryLevel()
public boolean isCharging()
public double getLatitude()
public double getLongitude()
public void setLatitude(double latitude)
public void setLongitude(double longitude)
public void setBatteryLevel(int batteryLevel)
public void setCharging(boolean charging)
public java.lang.String toString()
toString
in class java.lang.Object