OrderedAttribute

com.phasmidsoftware.gryphon.core.OrderedAttribute
trait OrderedAttribute[A] extends Attribute[A]

A trait that extends Attribute to enable comparison between attributes of type A and others of compatible types.

Type parameters

A

the type of the attribute that this trait represents. Must be comparable using Scala's Ordering.

Attributes

Graph
Supertypes
trait Attribute[A]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def compare[T >: A : Ordering](other: Attribute[T]): Int

Compares this attribute with another attribute, returning an integer to indicate their relative order. The comparison is performed using an implicit Ordering for the type of the attributes.

Compares this attribute with another attribute, returning an integer to indicate their relative order. The comparison is performed using an implicit Ordering for the type of the attributes.

Value parameters

other

the other Attribute instance to compare against. It must have an attribute of type T, where T is a supertype of A and has an implicit Ordering available.

Attributes

Returns

an integer indicating the relative order of the two attributes: - a negative integer if this attribute is less than the other attribute, - zero if they are equal, - a positive integer if this attribute is greater than the other attribute.

Inherited and Abstract methods

def attribute: A

Retrieves the attribute of type A associated with this instance.

Retrieves the attribute of type A associated with this instance.

Attributes

Returns

the attribute of type A representing the defining characteristic or property of this instance.

Inherited from:
Attribute