Package com.topologi.diffx.event
Interface DiffXEvent
- All Superinterfaces:
XMLFormattable,XMLWritable
- All Known Subinterfaces:
AttributeEvent,CloseElementEvent,OpenElementEvent,TextEvent
- All Known Implementing Classes:
AttributeEventImpl,AttributeEventNSImpl,CharactersEvent,CharactersEventBase,CharEvent,CloseElementEventImpl,CloseElementEventNSImpl,CommentEvent,DiffXEventBase,IgnorableSpaceEvent,LineEvent,OpenElementEventImpl,OpenElementEventNSImpl,ProcessingInstructionEvent,SpaceEvent,WordEvent,XMLBranchEvent
Defines and event that can be processed by DiffX.
The main characteristics of a Diff-X event is that it can be compared for equality with another Diff-X event.
Events can be associated with a weight that can be used or ignored by an algorithm. The more weight the less likely an event will be considered to have been modified. The weight can change depending on the algorithm or configuration used.
For convenience, this interface extends the XMLWritable and
XMLFormattable in order to turn an event into XML easily. This
may change in the future, if the impact on performance is too heavy.
- Version:
- 7 April 2005
-
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(DiffXEvent e) Indicates whether the specified event is equal to this event.intReturns the weight of this event.voidsetWeight(int weight) Sets the weight of this event.Methods inherited from interface com.topologi.diffx.xml.XMLFormattable
toXML, toXMLMethods inherited from interface com.topologi.diffx.xml.XMLWritable
toXML
-
Method Details
-
equals
Indicates whether the specified event is equal to this event.- Parameters:
e- The event to compare it with thsi one.- Returns:
trueif considered equals;falseotherwise.
-
getWeight
int getWeight()Returns the weight of this event.The default weight should be 1.
- Returns:
- The weight of this event.
-
setWeight
void setWeight(int weight) Sets the weight of this event.This method is intended for use by algorithms, optimisers and loaders in order to adjust the importance of an event.
- Parameters:
weight- The weight of this event.
-