|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ChangeCollector
Interface that all change collectors must implement. A change collector collects all changes performed to given source and keeps tracks of them.
Each collector should use its own means of change collection and retrieval because of very different data nature the collector may represent.
The following must held true:
isChanged()
is false
then
isCompletelyChanged()
must be false
.clearChanges()
then both isChanged()
and isCompletelyChanged()
must return true
until
first change occurs.
Method Summary | |
---|---|
void |
clearChanges()
Clears the change tracer. |
Source |
getSource()
Returns a source that contains whole document. |
void |
init(Source source)
Initializes the collector with given source. |
boolean |
isChanged()
Checks if this collector has captured at least one change. |
boolean |
isCompletelyChanged()
Checks if the source object has changed completely since last call to clearChanges() . |
void |
reinit(Source source)
Reinitializes the collector. |
Method Detail |
---|
void init(Source source)
Initializes the collector with given source. Implementors must act as if
whole document was changed. Implementor should clone the
source
object if it intends to keep it.
Must be called exactly once as the first method.
source
- the source to reinit.void reinit(Source source)
Reinitializes the collector. The collector may act as if whole source was changed, or it may compare new source to previous source and reinitialize the list of changes.
May be called multiple times.
source
- Source getSource()
Returns a source that contains whole document.
boolean isCompletelyChanged()
Checks if the source object has changed completely since last call to
clearChanges()
.
true
if the source changed as a whole,
false
if it changed only partially or no change occured at
all.void clearChanges()
boolean isChanged()
true
if some changes occured, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |