Attributed

com.phasmidsoftware.gryphon.core.Attributed
trait Attributed[T, A]

A type-class trait defining a mechanism to associate an attribute of type A with an entity of type T.

The Attributed trait provides an abstraction to retrieve an attribute from a given object. It is intended to be mixed into types that need to support mapping an item to its associated attribute.

Type parameters

A

the type of the attribute that can be retrieved from the entity.

T

the type of the entity with which the attribute is associated.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def attribute(t: T): A

Retrieves the attribute of type A associated with the provided entity of type T.

Retrieves the attribute of type A associated with the provided entity of type T.

Value parameters

t

the entity of type T for which the associated attribute is to be retrieved.

Attributes

Returns

the attribute of type A associated with the given entity.