Version

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jagatoo.util.versioning
Class Version

    java.lang.Object
      org.jagatoo.util.versioning.Version

All Implemented Interfaces:
  java.lang.Comparable<Version>

    public class Version

extends java.lang.Object
implements java.lang.Comparable<Version>

General Version information.
Please note, that the version information is not guaranteed to be updated with each SVN commit. So the information might be outdated for development versions. Especially the revision-number will be outdated most of the time. Only releases are guaranteed to carry valid and correct version information.

Author:
  Marvin Froehlich (aka Qudus)

Constructor Summary
`Version(int major, int minor, int revision, java.lang.String attributes, int build)` Creates a new instance of Version information class.

Method Summary
`int` | `compareTo(Version that)`
`boolean` | `equals(java.lang.Object o)`
`java.lang.String` | `getAttributes()`
`int` | `getBuild()`
`int` | `getMajor()`
`int` | `getMinor()`
`int` | `getRevision()`
`static Version` | `parseVersion(java.lang.String str)` Parses a `Version` instance from the input string, which is expected to be formatted by the `toString()` method.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Version

    public Version(int major,
                   int minor,
                   int revision,
                   java.lang.String attributes,
                   int build)

  Creates a new instance of Version information class.

  Parameters:
    `major` - the major version number
    `minor` - the minor version number
    `revision` - the revision version number
    `attributes` - the version attributes (like "beta1" or "RC2")
    `build` - the version-control-revision number.

Method Detail

### getMajor

    public int getMajor()

  Returns:
    the major version number

### getMinor

    public int getMinor()

  Returns:
    the minor version number

### getRevision

    public int getRevision()

  Returns:
    the revision version number

### getAttributes

    public java.lang.String getAttributes()

  Returns:
    the version attributes (like "beta1" or "RC2") If no attributes are present, this is null.

### getBuild

    public int getBuild()

  Returns:
    the version-control-revision number. It is the revision, that was last checked in before this release. If this is an unreleased, the returned value is not guaranteed to be correct.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### compareTo

    public int compareTo(Version that)

  Specified by:
    `compareTo` in interface `java.lang.Comparable<Version>`

### parseVersion

    public static Version parseVersion(java.lang.String str)

  Parses a `Version` instance from the input string, which is expected to be formatted by the `toString()` method.

  Parameters:
    `str` -
  Returns:
    the resulting `Version` instance.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD