HasKey

com.phasmidsoftware.lascala.fp.HasKey
trait HasKey[V]

Type class trait to define something that has a key.

CONSIDER try to generalize this so that return value implements Ordering, rather than being any particular type like String.

Created by scalaprof on 11/17/16.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type K

Value members

Abstract methods

def createValue(w: K): V

The inverse of getKey. This allows us to form a value from a String

The inverse of getKey. This allows us to form a value from a String

Value parameters

w

the key corresponding to the desired value

Attributes

Returns

the value

def getKey(v: V): K

Get the key for value v as a String

Get the key for value v as a String

Value parameters

v

a value

Attributes

Returns

the "key" for that value