Package org.eclipse.handly.snapshot
Class Snapshot
java.lang.Object
org.eclipse.handly.snapshot.Snapshot
- All Implemented Interfaces:
ISnapshot
- Direct Known Subclasses:
DocumentSnapshot,NonExpiringSnapshot,TextFileBufferSnapshot,TextFileSnapshot,TextFileStoreSnapshot
Abstract superclass of all snapshots.
Implements an equivalence relation on snapshots.
-
Constructor Details
-
Snapshot
public Snapshot()
-
-
Method Details
-
isEqualTo
Description copied from interface:ISnapshotIndicates whether some other snapshot is "equal to" this one.If snapshots are equal they have equal contents (or had had equal contents before one or both of them expired). However, the converse is not necessarily true.
Note that snapshots which are equal but not identical may become unequal when one or both of them expire, and may become equal again in case they return to the valid (unexpired) state.
Implementations of this method must be reflexive, symmetric and transitive on non-null references.
-
predictEquality
Predicts whether this snapshot isequalto the given snapshot without actually obtaining snapshotcontents. Must returnnullif cannot tell for sure. Any non-null result must meet the contract ofISnapshot.isEqualTo(ISnapshot).- Parameters:
other- the other snapshot (notnulland not identical to the receiver)- Returns:
trueif the snapshots are predicted to be equal,falseif the snapshots are predicted to be unequal, andnullif there is no prediction
-