net.sourceforge.wurfl.core.handlers.classifiers
Class FilteredDevices

java.lang.Object
  extended by net.sourceforge.wurfl.core.handlers.classifiers.FilteredDevices

public class FilteredDevices
extends Object

Filtered device data.

This class is responsible for collect devices classified according to their user-agent.

Version:
$Id: FilteredDevices.java 432 2010-05-06 12:12:53Z filippo.deluca $
Author:
Fantayeneh Asres Gizaw, Filippo De Luca

Constructor Summary
FilteredDevices()
          Default constructor
 
Method Summary
 FilteredDevices clear()
          FIXME: Document it
 boolean containsDevice(String deviceId)
           
 String getDevice(String userAgent)
          Return a device by collected user-agent.
 Set getDevices()
          Return the collected user-agent naturally ordered.
 SortedSet getUserAgents()
          Return the collected user-agent naturally ordered.
 FilteredDevices putDevice(String userAgent, String deviceId)
          Store device identifier with corresponding user-agent.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilteredDevices

public FilteredDevices()
Default constructor

Method Detail

getUserAgents

public SortedSet getUserAgents()
Return the collected user-agent naturally ordered.

Returns:
A SortedSet containing collected user-agent.

getDevices

public Set getDevices()
Return the collected user-agent naturally ordered.

Returns:
A SortedSet containing collected user-agent.

getDevice

public String getDevice(String userAgent)
Return a device by collected user-agent.

Parameters:
userAgent - The user-agent corresponding to the device tried.
Returns:
The device identifier collected corresponding given user-agent, if the given user-agent is not collected it returns null.

containsDevice

public boolean containsDevice(String deviceId)

putDevice

public FilteredDevices putDevice(String userAgent,
                                 String deviceId)
Store device identifier with corresponding user-agent.

Parameters:
userAgent - The user-agent associated to device identifier.
deviceId - The device identifier to store.

clear

public FilteredDevices clear()
FIXME: Document it

Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2010 WURFL-Pro srl. All Rights Reserved.