KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > je > JEVersion


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: JEVersion.java,v 1.92 2006/12/05 15:56:58 linda Exp $
7  */

8
9 package com.sleepycat.je;
10
11 /**
12  * Javadoc for this public class is generated
13  * via the doc templates in the doc_src directory.
14  */

15 public class JEVersion {
16
17     /**
18      * Javadoc for this public instance is generated via
19      * the doc templates in the doc_src directory.
20      */

21     public static final JEVersion CURRENT_VERSION =
22         new JEVersion(3, 2, 13, null);
23     
24     private int majorNum;
25     private int minorNum;
26     private int patchNum;
27     private String JavaDoc name;
28
29     private JEVersion(int majorNum, int minorNum, int patchNum, String JavaDoc name) {
30         this.majorNum = majorNum;
31         this.minorNum = minorNum;
32         this.patchNum = patchNum;
33         this.name = name;
34     }
35
36     /**
37      * Javadoc for this public method is generated via
38      * the doc templates in the doc_src directory.
39      */

40     public String JavaDoc toString() {
41         return getVersionString();
42     }
43
44     /**
45      * Javadoc for this public method is generated via
46      * the doc templates in the doc_src directory.
47      */

48     public int getMajor() {
49         return majorNum;
50     }
51
52     /**
53      * Javadoc for this public method is generated via
54      * the doc templates in the doc_src directory.
55      */

56     public int getMinor() {
57         return minorNum;
58     }
59
60     /**
61      * Javadoc for this public method is generated via
62      * the doc templates in the doc_src directory.
63      */

64     public int getPatch() {
65         return patchNum;
66     }
67
68     /**
69      * Javadoc for this public method is generated via
70      * the doc templates in the doc_src directory.
71      */

72     public String JavaDoc getNumericVersionString() {
73         StringBuffer JavaDoc version = new StringBuffer JavaDoc();
74         version.append(majorNum).append(".");
75         version.append(minorNum).append(".");
76         version.append(patchNum);
77         return version.toString();
78     }
79
80     /**
81      * Javadoc for this public method is generated via
82      * the doc templates in the doc_src directory.
83      */

84     public String JavaDoc getVersionString() {
85         StringBuffer JavaDoc version = new StringBuffer JavaDoc();
86         version.append(majorNum).append(".");
87         version.append(minorNum).append(".");
88         version.append(patchNum);
89     if (name != null) {
90         version.append(" (");
91         version.append(name).append(")");
92     }
93         return version.toString();
94     }
95 }
96
Popular Tags