public class Device
extends java.lang.Object
Constructor and Description |
---|
Device(java.lang.String _architecture,
DeviceType _type,
Brand _brand,
Brand _manufacturer,
java.lang.String _description)
This constructor allows for a manufacturer and a brand to be defined.
|
Device(java.lang.String _architecture,
DeviceType _type,
Brand _brand,
Brand _manufacturer,
java.lang.String _description,
boolean _isTouch)
This constructor allows for every field to be defined.
|
Device(java.lang.String _architecture,
DeviceType _type,
Brand _brand,
java.lang.String _description)
This constructor does not specify the
manufacturer and assumes it is the same as the brand . |
Device(java.lang.String _architecture,
DeviceType _type,
Brand _brand,
java.lang.String _description,
boolean _isTouch)
This constructor allows for touch to be defined.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getArchitecture() |
Brand |
getBrand() |
java.lang.String |
getDevice() |
DeviceType |
getDeviceType() |
Brand |
getManufacturer() |
int |
hashCode() |
boolean |
isTouch() |
void |
setArchitecture(java.lang.String a) |
void |
setBrandAndManufacturer(Brand b)
Sets the brand and the manufacturer of the device.
|
void |
setDevice(java.lang.String name) |
void |
setDeviceType(DeviceType t) |
void |
setTouch(boolean t) |
public Device(java.lang.String _architecture, DeviceType _type, Brand _brand, java.lang.String _description)
manufacturer
and assumes it is the same as the brand
._brand
- The vendor of this device, and its manufacturer._type
- The type of this device (desktop, laptop, tablet, ...)._description
- The text description of this device._architecture
- The cpu architecture of this device (x86, arm, ...).public Device(java.lang.String _architecture, DeviceType _type, Brand _brand, Brand _manufacturer, java.lang.String _description)
_manufacturer
- The manufacturer of this device._brand
- The vendor of this device._type
- The type of this device (desktop, laptop, tablet, ...)._description
- The text description of this device._architecture
- The cpu architecture of this device (x86, arm, ...).public Device(java.lang.String _architecture, DeviceType _type, Brand _brand, Brand _manufacturer, java.lang.String _description, boolean _isTouch)
_manufacturer
- The manufacturer of this device._brand
- The vendor of this device._type
- The type of this device (desktop, laptop, tablet, ...)._description
- The text description of this device._architecture
- The cpu architecture of this device (x86, arm, ...)._isTouch
- Whether the device has touch capability or not.public Device(java.lang.String _architecture, DeviceType _type, Brand _brand, java.lang.String _description, boolean _isTouch)
_brand
- The vendor of this device._type
- The type of this device (desktop, laptop, tablet, ...)._description
- The text description of this device._architecture
- The cpu architecture of this device (x86, arm, ...)._isTouch
- Whether the device has touch capability or not.public void setBrandAndManufacturer(Brand b)
b
- the Brand to set in both fields.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public DeviceType getDeviceType()
public void setDeviceType(DeviceType t)
t
- The type of the device. For example, COMPUTER, PHONE, TABLET, ...public Brand getBrand()
public Brand getManufacturer()
public java.lang.String getArchitecture()
public void setArchitecture(java.lang.String a)
a
- The architecture of the device. May be "i386", "arm", "x86_64", "Power PC" or any other architecture.public java.lang.String getDevice()
public void setDevice(java.lang.String name)
name
- The description of the device, for example "Galaxy S4" or "iPhone", ...public boolean isTouch()
public void setTouch(boolean t)
t
- Whether the device has touch capabilities or not