View Javadoc

1   /*
2    ProgramVersion.java
3    Creation date : 8/06/2010
4    Copyright © Benjamin Croizet (graffity2199@yahoo.fr)
5   
6    This program is free software; you can redistribute it and/or
7    modify it under the terms of the GNU General Public License
8    or GNU Lesser General Public License as published by the
9    Free Software Foundation; either version 3 of the License,
10   or (at your option) any later version.
11  
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16  
17   You should have received copies of the GNU General Public License
18   and GNU Lesser General Public License along with this program;
19   if not, write to the Free Software Foundation, Inc.,
20   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21   http://www.fsf.org/licensing/licenses/gpl.html
22   http://www.gnu.org/licenses/lgpl.html
23   */
24  
25  package net.sourceforge.plantumldependency.commoncli.program.version;
26  
27  import java.io.Serializable;
28  import java.util.Date;
29  
30  import net.sourceforge.plantumldependency.common.clone.DeepCloneable;
31  
32  /**
33   * The interface which describes a program version, major, minor and revision number.
34   *
35   * @author Benjamin Croizet (<a href="mailto:graffity2199@yahoo.fr>graffity2199@yahoo.fr</a>)
36   * @since 1.3.0
37   * @version 1.3.0
38   */
39  public interface ProgramVersion extends Comparable < ProgramVersion >, Serializable, DeepCloneable < ProgramVersion > {
40  
41      /**
42       * Gets the program compilation time.
43       *
44       * @return the program revision version number as an {@link Date}.
45       * @since 1.3.0
46       */
47      Date getCompilationTime();
48  
49      /**
50       * Gets the program full version number, i.e. major.minor.revision numbers.
51       *
52       * @return the program full version number as an {@link String}.
53       * @since 1.3.0
54       */
55      String getFullVersionNumber();
56  
57      /**
58       * Gets the program major version number.
59       *
60       * @return the program major version number as an <code>integer</code>.
61       * @since 1.3.0
62       */
63      int getMajorVersionNumber();
64  
65      /**
66       * Gets the program minor version number.
67       *
68       * @return the program minor version number as an <code>integer</code>.
69       * @since 1.3.0
70       */
71      int getMinorVersionNumber();
72  
73      /**
74       * Gets the program revision version number.
75       *
76       * @return the program revision version number as an <code>integer</code>.
77       * @since 1.3.0
78       */
79      int getRevisionVersionNumber();
80  
81      /**
82       * Tells if the program version is a snapshot.
83       *
84       * @return <code>true</code> if the program version is a snapshot, false otherwise.
85       * @since 1.3.0
86       */
87      boolean isSnapshot();
88  }