org.apache.slide.content
Class NodeRevisionNumber

java.lang.Object
  extended byorg.apache.slide.content.NodeRevisionNumber
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public final class NodeRevisionNumber
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Node Revision Number class.

Version:
$Revision: 1.9 $
See Also:
Serialized Form

Field Summary
static NodeRevisionNumber HIDDEN_0_0
           
static int MAJOR
           
static int MINOR
           
 
Constructor Summary
NodeRevisionNumber()
          Create a new revision number.
NodeRevisionNumber(int major, int minor)
          Create a new revision number.
NodeRevisionNumber(NodeRevisionNumber revisionNumber)
          Create a new revision number based on a previous revision number.
NodeRevisionNumber(NodeRevisionNumber revisionNumber, boolean createBranch)
          Create a new revision number based on a previous revision number.
NodeRevisionNumber(java.lang.String revisionNumberStr)
          Create a new revision number.
 
Method Summary
(package private)  NodeRevisionNumber cloneObject()
          Clone.
 boolean equals(java.lang.Object obj)
          Equals.
 int getMajor()
          Get the first number in the revision number.
 int getMinor()
          Get the second number in the revision number.
 int getNbDigits()
          Return number of digits if the revision number.
 int getNumber(int pos)
          Get a number by specifying its order.
 int hashCode()
          HashCode.
 java.lang.String toString()
          Get a String representation of the revision number.
 void validate()
          Validate.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAJOR

public static final int MAJOR
See Also:
Constant Field Values

MINOR

public static final int MINOR
See Also:
Constant Field Values

HIDDEN_0_0

public static final NodeRevisionNumber HIDDEN_0_0
Constructor Detail

NodeRevisionNumber

public NodeRevisionNumber()
Create a new revision number.


NodeRevisionNumber

public NodeRevisionNumber(int major,
                          int minor)
Create a new revision number.

Parameters:
major -
minor -

NodeRevisionNumber

public NodeRevisionNumber(java.lang.String revisionNumberStr)
Create a new revision number.

Parameters:
revisionNumberStr - String representation of the revision number

NodeRevisionNumber

public NodeRevisionNumber(NodeRevisionNumber revisionNumber)
Create a new revision number based on a previous revision number.

Parameters:
revisionNumber - Previous revision number

NodeRevisionNumber

public NodeRevisionNumber(NodeRevisionNumber revisionNumber,
                          boolean createBranch)
Create a new revision number based on a previous revision number.

Parameters:
revisionNumber - Previous revision number
createBranch - True if a new branch is to be created
Method Detail

getMajor

public int getMajor()
Get the first number in the revision number.

Returns:
int

getMinor

public int getMinor()
Get the second number in the revision number.

Returns:
int

getNumber

public int getNumber(int pos)
Get a number by specifying its order.

Parameters:
pos - Position of the number
Returns:
int

getNbDigits

public int getNbDigits()
Return number of digits if the revision number.

Returns:
int

toString

public java.lang.String toString()
Get a String representation of the revision number.

Returns:
String

hashCode

public int hashCode()
HashCode.

Returns:
int

equals

public boolean equals(java.lang.Object obj)
Equals.

Parameters:
obj - Object to test
Returns:
boolean True if the two object are equal :
  • obj is of type NodeRevisionNumber and is not null
  • The string representations are equal are equal

  • cloneObject

    NodeRevisionNumber cloneObject()
    Clone.

    Returns:
    Object clone

    validate

    public void validate()
    Validate.