JMRTD 0.4.5

net.sourceforge.scuba.smartcards
Class CardEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.sourceforge.scuba.smartcards.CardEvent
All Implemented Interfaces:
Serializable

public class CardEvent
extends EventObject

Event for card insertion and removal.

Version:
$Revision: $
Author:
Martijn Oostdijk (martijn.oostdijk@gmail.com)
See Also:
Serialized Form

Field Summary
static int INSERTED
          Event type constant.
static int REMOVED
          Event type constant.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CardEvent(int type, CardService service)
          Creates an event.
 
Method Summary
 boolean equals(Object other)
          Whether this event is equal to the event in other.
 CardService getService()
          Gets the event source.
 int getType()
          Gets the event type.
 int hashCode()
          Gets a hash code for this event.
 String toString()
          Gets a textual representation of this event.
 
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

REMOVED

public static final int REMOVED
Event type constant.

See Also:
Constant Field Values

INSERTED

public static final int INSERTED
Event type constant.

See Also:
Constant Field Values
Constructor Detail

CardEvent

public CardEvent(int type,
                 CardService service)
Creates an event.

Parameters:
type - event type
service - event source
Method Detail

getType

public int getType()
Gets the event type.

Returns:
event type

getService

public CardService getService()
Gets the event source.

Returns:
event source

toString

public String toString()
Gets a textual representation of this event.

Overrides:
toString in class EventObject
Returns:
a textual representation of this event

equals

public boolean equals(Object other)
Whether this event is equal to the event in other.

Overrides:
equals in class Object
Returns:
a boolean

hashCode

public int hashCode()
Gets a hash code for this event.

Overrides:
hashCode in class Object
Returns:
a hash code for this event

JMRTD 0.4.5