net.sourceforge.wurfl.core.resource
Class WURFLModelEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.sourceforge.wurfl.core.resource.WURFLModelEvent
All Implemented Interfaces:
Serializable

public class WURFLModelEvent
extends EventObject

The event fired by the WURFLModel.

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

Field Summary
static int DEVICE_ADDED
          Constant for device added event
static int DEVICE_UPDATED
          Constant for device updated event
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
WURFLModelEvent(WURFLModel source, int type, Set devices)
          Build a WURFLModelEvent from WURFLModel, type and target devices.
 
Method Summary
 boolean equals(Object obj)
           
 Set getDevices()
          Return the target devices of this event.
 int getType()
          Return the event type in DEVICE_ADDED, DEVICE_REMOVED or DEVICE_UPDATED.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEVICE_ADDED

public static final int DEVICE_ADDED
Constant for device added event

See Also:
Constant Field Values

DEVICE_UPDATED

public static final int DEVICE_UPDATED
Constant for device updated event

See Also:
Constant Field Values
Constructor Detail

WURFLModelEvent

public WURFLModelEvent(WURFLModel source,
                       int type,
                       Set devices)
Build a WURFLModelEvent from WURFLModel, type and target devices.

Parameters:
source - The model firing this event.
type - The type of event fired in DEVICE_ADDED, DEVICE_REMOVED, DEVICE_UPDATED.
devices - The ModelDevices target of this event.
Method Detail

getType

public int getType()
Return the event type in DEVICE_ADDED, DEVICE_REMOVED or DEVICE_UPDATED.

Returns:
int Type of this event

getDevices

public Set getDevices()
Return the target devices of this event.

Returns:
a Set of ModelDevice target of this event.

toString

public String toString()
Overrides:
toString in class EventObject

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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