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.

Linear Supertypes
Serializable, Product, Equals, Ordered[Version], Comparable[Version], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Version
  2. Serializable
  3. Product
  4. Equals
  5. Ordered
  6. Comparable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Version(v: String)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def <(that: Version): Boolean
    Definition Classes
    Ordered
  4. def <=(that: Version): Boolean
    Definition Classes
    Ordered
  5. def ==(that: Version): Boolean
  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. def >(that: Version): Boolean
    Definition Classes
    Ordered
  8. def >=(that: Version): Boolean
    Definition Classes
    Ordered
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  11. def compare(v2: Version): Int
    Definition Classes
    Version → Ordered
  12. def compareTo(that: Version): Int
    Definition Classes
    Ordered → Comparable
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. val isValid: Boolean
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. def productElementNames: Iterator[String]
    Definition Classes
    Product
  22. val rc: Option[Int]
  23. val rcRegex: Regex
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. val v: String
  26. val versLst: List[Int]
  27. val versRegex: Regex
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Ordered[Version]

Inherited from Comparable[Version]

Inherited from AnyRef

Inherited from Any

Ungrouped