X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Forg%2Fvamsas%2Fclient%2FVobjhash.java;fp=src%2Forg%2Fvamsas%2Fclient%2FVobjhash.java;h=116e2ff4c9f67fcb1b49a733d2afc0b70400c709;hb=f046d0f3bf72a74896cd6a3cbda4bab6b077ef57;hp=0000000000000000000000000000000000000000;hpb=4dc56e102f8959071f009385d75a89967e68a4f6;p=vamsas.git diff --git a/src/org/vamsas/client/Vobjhash.java b/src/org/vamsas/client/Vobjhash.java new file mode 100644 index 0000000..116e2ff --- /dev/null +++ b/src/org/vamsas/client/Vobjhash.java @@ -0,0 +1,25 @@ +package org.vamsas.client; + +/** + * Holds information about Vobj instances that is held over between different writes to the document. + * @author JimP + * + */ +public class Vobjhash { + int hashvalue; + /** + * creates a record of the hash value for a vamsas document object + * @param tobemarshalled + */ + public Vobjhash(Vobject tobemarshalled) { + hashvalue = tobemarshalled.get__last_hash(); + } + /** + * compares the old hash value with the unmarshalled object's most recently computed hash value. + * @param unmarshalled + * @return true if the hash values differ + */ + public boolean isUpdated(Vobject unmarshalled) { + return hashvalue==unmarshalled.get__last_hash(); + } +}