|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.wurfl.core.resource.ModelDevice
public class ModelDevice
This immutable class represent a device defined in WURFL repository.
This class represents the WURFL device defined in XML file and patches.
| Nested Class Summary | |
|---|---|
static class |
ModelDevice.Builder
Builder used to build ModelDevice instance. |
| Constructor Summary | |
|---|---|
protected |
ModelDevice()
Protected Constructor for Builder |
|
ModelDevice(String userAgent,
String id,
String fallBack,
boolean actualDeviceRoot,
Map capabilities,
Map groupsByCapability)
Build ModelDevice. |
| Method Summary | |
|---|---|
boolean |
defineCapability(String name)
Return if this device define a capability. |
boolean |
defineGroup(String group)
Return if this device define the given group. |
boolean |
equals(Object obj)
|
Map |
getCapabilities()
Return the capabilities defined by this device. |
Map |
getCapabilitiesForGroup(String group)
Return the capabilities identifiers defined by a group. |
Set |
getCapabilitiesNamesForGroup(String group)
Return the capabilities defined by the given group. |
String |
getCapability(String name)
Return a capability value. |
String |
getFallBack()
Return the identifier of the fallback device. |
String |
getGroupForCapability(String capability)
Return the group defining the given capability. |
Set |
getGroups()
Return the groups defined by this device. |
Map |
getGroupsByCapability()
Return the capabilities identifiers and the defining groups. |
String |
getID()
Return the uniques identifier string of this device. |
String |
getUserAgent()
Return the user-agent string defined in this device. |
int |
hashCode()
|
boolean |
isActualDeviceRoot()
Return whether this device is root device. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ModelDevice()
public ModelDevice(String userAgent,
String id,
String fallBack,
boolean actualDeviceRoot,
Map capabilities,
Map groupsByCapability)
userAgent - User-Agent defined by this deviceid - The identifier of this device.fallBack - The identifier of fallback deviceactualDeviceRoot - Define if this is a root devicecapabilities - The defined capabilitiesgroupsByCapability - The groups mapped to capabilities name.| Method Detail |
|---|
public String getUserAgent()
public String getID()
public String getFallBack()
public boolean isActualDeviceRoot()
public Map getCapabilities()
public Map getGroupsByCapability()
public boolean defineCapability(String name)
name - The capability identifier.
public String getCapability(String name)
name - The name of capability to get value.
public boolean defineGroup(String group)
group - The group identifier to probe.
public Set getGroups()
public String getGroupForCapability(String capability)
capability - The capability to get defining group.
public Set getCapabilitiesNamesForGroup(String group)
group - The group defining capabilities to get.
public Map getCapabilitiesForGroup(String group)
group - The defining group of the capabilities to get.
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||