Can
com.phasmidsoftware.number.algebra.core.Can
Trait Can represents an abstraction where a type T which extends Structure can cast an instance to itself. It is the base trait for all other traits that extend Can.
This trait facilitates type-safe casting of instances to a specific subtype of Structure. The trait no longer extends Structure, removing the circular dependency while maintaining type safety through ClassTag-based runtime verification.
Type parameters
- T
-
the type parameter which must be a subtype of
Structure
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait CanAddAndSubtract[T]class RationalNumberclass Realclass WholeNumberclass Angleclass Exponentialclass BinaryExponentialclass NaturalExponentialtrait CanMultiplyAndDivide[T]trait CanNegate[T]
Members list
In this article