case class Version(v: String) extends Ordered[Version] with Product with Serializable
This a comparable (with >,<,==) version String helper. It should be able to handle most version Strings within reason. It will try to pull out the first group of digits separated by '.'s and convert it to a List of Int for comparison. It also searches for a release candidate version at the end of the String that's formatted as "...-rc#[EOL]". If a version isn't matched, it will be treated as if it was '0' and isValid will be false.
One thing to note with that limitation is that it won't parse a single digit String. This is because with the regex it uses, it needs to have some sort of anchor to tell that the digit it's looking at is actually part of a valid version number. If it matched for \d+(\.\d+)* instead, it would end up the same as \d+ since the second term is optional
Created by RyanM on 1/11/2017.
- Alphabetic
- By Inheritance
- Version
- Serializable
- Product
- Equals
- Ordered
- Comparable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Version(v: String)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def <(that: Version): Boolean
- Definition Classes
- Ordered
- def <=(that: Version): Boolean
- Definition Classes
- Ordered
- def ==(that: Version): Boolean
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def >(that: Version): Boolean
- Definition Classes
- Ordered
- def >=(that: Version): Boolean
- Definition Classes
- Ordered
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compare(v2: Version): Int
- Definition Classes
- Version → Ordered
- def compareTo(that: Version): Int
- Definition Classes
- Ordered → Comparable
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isValid: Boolean
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val rc: Option[Int]
- val rcRegex: Regex
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val v: String
- val versLst: List[Int]
- val versRegex: Regex
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()