public final class ViewModificationCounter
extends java.lang.Object
Forks are added lazily when they are modified.
All method arguments are non-null by default.
The class is thread-safe if View
s are not shared among threads
(i.e., if each thread has its own Views, which must be the case for Views are not thread-safe).
Such property is useful in the integration tests.
Modifier and Type | Method and Description |
---|---|
static ViewModificationCounter |
getInstance() |
java.lang.Integer |
getModificationCount(View view)
Returns the current value of the modification counter of the given view.
|
boolean |
isModifiedSince(View view,
java.lang.Integer modCount)
Returns true if the view has been modified since the given modCount.
|
void |
notifyModified(Fork fork)
Notifies that the fork is modified.
|
public static ViewModificationCounter getInstance()
public void notifyModified(Fork fork)
Each invocation increases the modification counter of the fork. Initial value is zero.
fork
- a modified (or about to be modified) forkpublic boolean isModifiedSince(View view, java.lang.Integer modCount)
Copyright © 2018 Exonum. All rights reserved.