Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.dghda.module
Class Module.ModuleVersion  view Module.ModuleVersion download Module.ModuleVersion.java

java.lang.Object
  extended bycom.dghda.module.Module.ModuleVersion
All Implemented Interfaces:
java.lang.Comparable
Enclosing class:
Module

public static final class Module.ModuleVersion
extends java.lang.Object
implements java.lang.Comparable

A class which encapsulates a module's version information.


Field Summary
 java.lang.String author
          The module's author.
 int major
          The major version number.
 int minor
          The minor version number.
static java.lang.String VERSION_AUTHOR
          The name of the property containing the module's author.
static java.lang.String VERSION_MAJOR
          The name of the property containing the module's major version number.
static java.lang.String VERSION_MINOR
          The name of the property containing the module's minor version number.
 
Constructor Summary
Module.ModuleVersion(int maj, int min, java.lang.String aut)
          Constructs a new version object.
 
Method Summary
 int compareTo(java.lang.Object obj)
          Compares two versions.
 boolean equals(java.lang.Object obj)
          Checks two versions for equality.
 void setProperties(java.lang.String id, java.util.Properties config)
          Sets the version properties in the given properties object.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION_MAJOR

public static final java.lang.String VERSION_MAJOR
The name of the property containing the module's major version number.

See Also:
Constant Field Values

VERSION_MINOR

public static final java.lang.String VERSION_MINOR
The name of the property containing the module's minor version number.

See Also:
Constant Field Values

VERSION_AUTHOR

public static final java.lang.String VERSION_AUTHOR
The name of the property containing the module's author.

See Also:
Constant Field Values

major

public int major
The major version number.


minor

public int minor
The minor version number.


author

public java.lang.String author
The module's author.

Constructor Detail

Module.ModuleVersion

public Module.ModuleVersion(int maj,
                            int min,
                            java.lang.String aut)
Constructs a new version object.

Method Detail

equals

public boolean equals(java.lang.Object obj)
Checks two versions for equality. The author is ignored in checking for equality.


compareTo

public int compareTo(java.lang.Object obj)
Compares two versions. Only the version numbers are taken into account when comparing versions.

Specified by:
compareTo in interface java.lang.Comparable

setProperties

public void setProperties(java.lang.String id,
                          java.util.Properties config)
Sets the version properties in the given properties object.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).