|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ModificationMark
A modification mark is used to check if an object was modified since the
last synchronization.
This is typically a counter
or a
timestamp.
Handling is as follows:
markModification()
.checkForComodification()
if the object
has changed meanwhile.markModification()
is used.This interface is the solution of the problem to find a representation
of AbstractList.modCount
that can be interchanged between
independent classes.
A note on equals
:
Objects of this types are no value objects:
Two counters are still different, although they may have the same state.
Therefore it is recommended that the Object
implementation of
equals()
is not overwritten.
Method Summary | |
---|---|
void |
checkForComodification()
Checks if the mother object has changed since the last synchronization . |
ModificationMark |
createChild()
Creates a new child of this mark. |
void |
markModification()
Tells the modification mark that the base object has changed. |
Method Detail |
---|
ModificationMark createChild()
void checkForComodification()
synchronization
.
If this is not a child object nothing happens.
ConcurrentModificationException
- if the mother object has
changed since the last synchronization.void markModification()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |