
com.nthportal.versions.Dash.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of versions_2.11 Show documentation
Show all versions of versions_2.11 Show documentation
A Scala library for representing versions as objects.
The newest version!
package com.nthportal.versions
import scala.language.higherKinds
/**
* Indicates that an extension can be appended to this to create an extended version.
*
* @tparam V the type of the version component of the extended version
* @tparam EV the type of the extended version
*/
trait Dash[V <: VersionBase[V, EV], EV[E] <: ExtendedVersionBase[V, E, EV]] {
/**
* Creates an extended version from this version with the specified extension.
*
* @param extension the extension for the ExtendedVersion
* @param ed the [[ExtensionDef extension definition]]
* @tparam E the type of the extension
* @return an extended version with this version and the specified extension
*/
def dash[E](extension: E)(implicit ed: ExtensionDef[E]): EV[E]
/**
* @see [[dash]]
*/
final def --[E](extension: E)(implicit ed: ExtensionDef[E]): EV[E] = dash(extension)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy