analysis.lami: Implementation of LAMI plugins
[deliverable/tracecompass.git] / analysis / org.eclipse.tracecompass.analysis.lami.core / src / org / eclipse / tracecompass / internal / provisional / analysis / lami / core / types / LamiVersion.java
1 /*******************************************************************************
2 * Copyright (c) 2016 EfficiOS Inc., Alexandre Montplaisir
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
9
10 package org.eclipse.tracecompass.internal.provisional.analysis.lami.core.types;
11
12 import org.eclipse.jdt.annotation.Nullable;
13
14 /**
15 * Lami 'version' data type
16 *
17 * @author Alexandre Montplaisir
18 */
19 public class LamiVersion {
20
21 private final int fMajor;
22 private final int fMinor;
23 private final int fPatchLevel;
24 private final @Nullable String fExtra;
25
26 /**
27 * Construct a new version number. Normally to be show as:
28 *
29 * major.minor.patchlevel.extra
30 *
31 * @param major
32 * Major version number
33 * @param minor
34 * Minor version number
35 * @param patchLevel
36 * Patch version number
37 * @param extra
38 * Extra version number
39 */
40 public LamiVersion(int major, int minor, int patchLevel, @Nullable String extra) {
41 fMajor = major;
42 fMinor = minor;
43 fPatchLevel = patchLevel;
44 fExtra = extra;
45 }
46
47 /**
48 * @return The major version number
49 */
50 public int getMajor() {
51 return fMajor;
52 }
53
54 /**
55 * @return The minor version number
56 */
57 public int getMinor() {
58 return fMinor;
59 }
60
61 /**
62 * @return The patchlevel version number
63 */
64 public int getPatchLevel() {
65 return fPatchLevel;
66 }
67
68 /**
69 * @return The extra version number. May be a string, and may be null.
70 */
71 public @Nullable String getExtra() {
72 return fExtra;
73 }
74 }
This page took 0.032494 seconds and 5 git commands to generate.