Class Revision


  • class Revision
    extends java.lang.Object
    The Revision object is used represent the revision of a class as read from a version attribute. It determines the type of deserialization that takes place.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean equal
      This is used to track the revision comparision of the class.
    • Constructor Summary

      Constructors 
      Constructor Description
      Revision()
      Constructor of the Revision object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean compare​(java.lang.Object expected, java.lang.Object current)
      This is used to compare the expected and current versions of the class.
      double getDefault()
      This is used to acquire the default revision.
      boolean isEqual()
      This returns the cached comparision of the revisions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • equal

        private boolean equal
        This is used to track the revision comparision of the class.
    • Constructor Detail

      • Revision

        public Revision()
        Constructor of the Revision object. This is used to create a comparator object that will compare and cache the comparison of the expected and current version of the class.
    • Method Detail

      • getDefault

        public double getDefault()
        This is used to acquire the default revision. The default revision is the revision expected if there is not attribute representing the version in the XML element for the object.
        Returns:
        this returns the default version for the object
      • compare

        public boolean compare​(java.lang.Object expected,
                               java.lang.Object current)
        This is used to compare the expected and current versions of the class. Once compared the comparison result is cached within the revision class so that it can be used repeatedly.
        Parameters:
        expected - this is the expected version of the class
        current - this is the current version of the class
        Returns:
        this returns true if the versions are the same
      • isEqual

        public boolean isEqual()
        This returns the cached comparision of the revisions. This will be true if not comparison was performed. If however one was performed then this will represent the result.
        Returns:
        this returns the cached version of the comparison