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.
Version:
$Id: $Id
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()

      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()

      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.
      Returns:
      a Version object
    • hashCode

      public int hashCode()

      hashCode.

      Overrides:
      hashCode in class Object
      Returns:
      a int
    • equals

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

      public String toString()

      toString.

      Overrides:
      toString in class Object
      Returns:
      a String object
    • nextMajorVersion

      public Version nextMajorVersion()

      nextMajorVersion.

      Returns:
      a Version object
    • nextMinorVersion

      public Version nextMinorVersion()

      nextMinorVersion.

      Returns:
      a Version object
    • nextMinorSubversion

      public Version nextMinorSubversion()

      nextMinorSubversion.

      Returns:
      a Version object
    • nextIncrementalRelease

      public Version nextIncrementalRelease()

      nextIncrementalRelease.

      Returns:
      a Version object