Package org.scoverage.plugin
Class ScalaVersion
java.lang.Object
org.scoverage.plugin.ScalaVersion
Inspired by scala-maven-plugin's VersionNumber.java
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
The bugfix Scala version number.The binary compatible version number for this Scala version.The full version number, including the modifier if any.int
The major Scala version number.int
The minor Scala version number.The modifier for this Scala version. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Ignores modifier, so can return `true` for any ScalaVersion with matching major, minor, bugfix.boolean
isAtLeast
(ScalaVersion other) Ignores modifier, so can return `true` for any ScalaVersion with matching major, minor, bugfix.boolean
isScala2()
-
Field Details
-
full
The full version number, including the modifier if any. -
compatible
The binary compatible version number for this Scala version. e.g. for 2.10.0-M1, this would be 2.10.0-M1, for 2.10.0, this would be 2.10, for 3.3.1, this would be 3. -
major
public int majorThe major Scala version number. e.g. for 2.10.0-M1, this would be 2. -
minor
public int minorThe minor Scala version number. e.g. for 2.10.0-M1, this would be 10. -
bugfix
public int bugfixThe bugfix Scala version number. e.g. for 2.10.0-M1, this would be 0. -
modifier
The modifier for this Scala version. e.g. for 2.10.0-M1, this would be M1.
-
-
Constructor Details
-
ScalaVersion
Creates a ScalaVersion from a String.- Parameters:
s
- String to parse
-
-
Method Details
-
isAtLeast
Ignores modifier, so can return `true` for any ScalaVersion with matching major, minor, bugfix.- Parameters:
other
- ScalaVersion to compare to- Returns:
- true if this version is of the same or newer Scala version as the other version
-
isAtLeast
Ignores modifier, so can return `true` for any ScalaVersion with matching major, minor, bugfix.- Parameters:
scalaVersion
- to compare to- Returns:
- true if this version is of the same or newer Scala version as the other version
-
isScala2
public boolean isScala2()- Returns:
- true if this is a Scala 2 version
-