Class Version

java.lang.Object
edu.cmu.tetrad.util.Version
All Implemented Interfaces:
TetradSerializable, Serializable

public class Version extends Object implements TetradSerializable
Represents the getModel Tetrad version. This needs to be modified manually each time a new version is released. The form of the version is a.b.c-d, where "a" is the major version, "b" is the minor version, "c" is the minor subversion, and "d" is the incremental release number for subversions.
Author:
josephramsey
See Also:
  • Constructor Details

    • Version

      public Version(String spec)
      Parses string version specs into Versions.
      Parameters:
      spec - A string of the form a.b.c-d.
  • Method Details

    • currentRepositoryVersion

      public static Version currentRepositoryVersion()
      Returns:
      the model version as stored in project/resources/version. This will be the same as the getModel viewable version when the ejar and task is run. (The file is copied over.)
    • currentViewableVersion

      public static Version currentViewableVersion()
      Returns:
      the model version as stored in the ejar. To sync this with the version at project/resources/version, run the ejar ant task.
    • serializableInstance

      public static Version serializableInstance()
      Generates a simple exemplar of this class to test serialization.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • nextMajorVersion

      public Version nextMajorVersion()
    • nextMinorVersion

      public Version nextMinorVersion()
    • nextMinorSubversion

      public Version nextMinorSubversion()
    • nextIncrementalRelease

      public Version nextIncrementalRelease()