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
diff --git a/analysis/org.eclipse.tracecompass.analysis.lami.core/src/org/eclipse/tracecompass/internal/provisional/analysis/lami/core/types/LamiVersion.java b/analysis/org.eclipse.tracecompass.analysis.lami.core/src/org/eclipse/tracecompass/internal/provisional/analysis/lami/core/types/LamiVersion.java
new file mode 100644 (file)
index 0000000..9f0135f
--- /dev/null
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EfficiOS Inc., Alexandre Montplaisir
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.provisional.analysis.lami.core.types;
+
+import org.eclipse.jdt.annotation.Nullable;
+
+/**
+ * Lami 'version' data type
+ *
+ * @author Alexandre Montplaisir
+ */
+public class LamiVersion {
+
+    private final int fMajor;
+    private final int fMinor;
+    private final int fPatchLevel;
+    private final @Nullable String fExtra;
+
+    /**
+     * Construct a new version number. Normally to be show as:
+     *
+     * major.minor.patchlevel.extra
+     *
+     * @param major
+     *            Major version number
+     * @param minor
+     *            Minor version number
+     * @param patchLevel
+     *            Patch version number
+     * @param extra
+     *            Extra version number
+     */
+    public LamiVersion(int major, int minor, int patchLevel, @Nullable String extra) {
+        fMajor = major;
+        fMinor = minor;
+        fPatchLevel = patchLevel;
+        fExtra = extra;
+    }
+
+    /**
+     * @return The major version number
+     */
+    public int getMajor() {
+        return fMajor;
+    }
+
+    /**
+     * @return The minor version number
+     */
+    public int getMinor() {
+        return fMinor;
+    }
+
+    /**
+     * @return The patchlevel version number
+     */
+    public int getPatchLevel() {
+        return fPatchLevel;
+    }
+
+    /**
+     * @return The extra version number. May be a string, and may be null.
+     */
+    public @Nullable String getExtra() {
+        return fExtra;
+    }
+}
This page took 0.026822 seconds and 5 git commands to generate.