Modifier and Type | Field and Description |
---|---|
static LiteDevice |
MOBILE_INSTANCE |
static LiteDevice |
NORMAL_INSTANCE |
static LiteDevice |
TABLET_INSTANCE |
Constructor and Description |
---|
LiteDevice()
Creates a LiteDevice with DeviceType of NORMAL and DevicePlatform UNKNOWN
|
LiteDevice(DeviceType deviceType)
Creates a LiteDevice with DevicePlatform UNKNOWN
|
LiteDevice(DeviceType deviceType,
DevicePlatform devicePlatform)
Creates a LiteDevice
|
Modifier and Type | Method and Description |
---|---|
static Device |
from(DeviceType deviceType,
DevicePlatform devicePlatform) |
DevicePlatform |
getDevicePlatform() |
DeviceType |
getDeviceType() |
boolean |
isMobile()
True if this device is a mobile device such as an Apple iPhone or an Nexus One Android.
|
boolean |
isNormal()
True if this device is not a mobile or tablet device.
|
boolean |
isTablet()
True if this device is a tablet device such as an Apple iPad or a Motorola Xoom.
|
String |
toString() |
public static final LiteDevice NORMAL_INSTANCE
public static final LiteDevice MOBILE_INSTANCE
public static final LiteDevice TABLET_INSTANCE
public LiteDevice()
public LiteDevice(DeviceType deviceType)
deviceType
- the type of device i.e. NORMAL, MOBILE, TABLETpublic LiteDevice(DeviceType deviceType, DevicePlatform devicePlatform)
deviceType
- the type of device i.e. NORMAL, MOBILE, TABLETdevicePlatform
- the platform of device, i.e. IOS or ANDROIDpublic DevicePlatform getDevicePlatform()
getDevicePlatform
in interface Device
public DeviceType getDeviceType()
public boolean isNormal()
Device
public boolean isMobile()
Device
public boolean isTablet()
Device
public static Device from(DeviceType deviceType, DevicePlatform devicePlatform)