public class TokenizerPropertyEvent
extends java.lang.Object
The class TokenizerPropertyEvent
describes changes in
TokenizerProperties
objects. Instances of this class are produced by
TokenizerProperties
and passed to TokenizerPropertyListener
objects that are registered with the issuing TokenizerProperties
instance.
TokenizerProperties
,
TokenizerPropertyListener
Modifier and Type | Field and Description |
---|---|
static byte |
PROPERTY_ADDED
A property has been added.
|
static byte |
PROPERTY_MODIFIED
A property has been modified.
|
static byte |
PROPERTY_REMOVED
A property has been removed.
|
Constructor and Description |
---|
TokenizerPropertyEvent()
The standard constructor initializes an emtpy event.
|
TokenizerPropertyEvent(int type,
TokenizerProperty property)
This constructor takes the type of the event and the
TokenizerProperty
that changed. |
TokenizerPropertyEvent(int type,
TokenizerProperty property,
TokenizerProperty oldProperty)
This constructor takes the type of the event and the
TokenizerProperty
that changed together with its old value. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object that)
Redefinition of the well-known
Object.equals(java.lang.Object) method. |
TokenizerProperty |
getOldProperty()
Retrieving the property that was set before the modification.
|
TokenizerProperty |
getProperty()
Retrieving the property this event is reporting.
|
int |
getType()
Retrieving the event type.
|
void |
setOldProperty(TokenizerProperty property)
Setting the
TokenizerProperty that was changed. |
void |
setProperty(TokenizerProperty property)
Setting the
TokenizerProperty the event is about. |
void |
setType(int type)
Setting the event type.
|
java.lang.String |
toString()
Redefinition of the well-known
Object.toString() method. |
public static final byte PROPERTY_ADDED
public static final byte PROPERTY_REMOVED
public static final byte PROPERTY_MODIFIED
public TokenizerPropertyEvent()
public TokenizerPropertyEvent(int type, TokenizerProperty property)
TokenizerProperty
that changed.type
- type of the event, one of the PROPERTY_...
constantsproperty
- the property that was added, removed or the new value of a modified onepublic TokenizerPropertyEvent(int type, TokenizerProperty property, TokenizerProperty oldProperty)
TokenizerProperty
that changed together with its old value.type
- type of the event, one of the PROPERTY_...
constantsproperty
- the property that was added, removed or the new value of a modified oneoldProperty
- the old value of the property that modifiedpublic void setType(int type)
PROPERTY_...
constants
for the parameter.type
- the event typegetType()
,
PROPERTY_ADDED
,
PROPERTY_REMOVED
,
PROPERTY_MODIFIED
public int getType()
PROPERTY_...
constants.public void setProperty(TokenizerProperty property)
TokenizerProperty
the event is about.property
- the added, removed or modified TokenizerProperty
public TokenizerProperty getProperty()
TokenizerProperty
that is added, removed or modifiedpublic void setOldProperty(TokenizerProperty property)
TokenizerProperty
that was changed. This is a valid
method for the event PROPERTY_MODIFIED
.property
- the previously set TokenizerProperty
public TokenizerProperty getOldProperty()
null
when the event is NOT PROPERTY_MODIFIED
.TokenizerProperty
set before the modificationpublic boolean equals(java.lang.Object that)
Object.equals(java.lang.Object)
method.equals
in class java.lang.Object
that
- compare this instance with that objecttrue
if the two object describe the same property,
false
otherwisepublic java.lang.String toString()
Object.toString()
method.toString
in class java.lang.Object
TokenizerProperty