scala.math.Equiv
See theEquiv companion object
trait Equiv[T] extends Any, Serializable
A trait for representing equivalence relations. It is important to distinguish between a type that can be compared for equality or equivalence and a representation of equivalence on some type. This trait is for representing the latter.
An equivalence relation is a binary relation on a type. This relation is exposed as the equiv method of the Equiv trait. The relation must be:
- reflexive:
equiv(x, x) == truefor any x of typeT. - symmetric:
equiv(x, y) == equiv(y, x)for anyxandyof typeT. - transitive: if
equiv(x, y) == trueandequiv(y, z) == true, thenequiv(x, z) == truefor anyx,y, andzof typeT.
Type parameters
- T
-
the type of values being compared for equivalence
Attributes
- Companion
- object
- Source
- Equiv.scala
- Graph
-
- Supertypes
-
trait Serializableclass Any
- Known subtypes
-
object BigDecimalobject BigIntobject Booleanobject Byteobject Chartrait IeeeEquivobject IeeeEquivtrait StrictEquivobject DeprecatedDoubleEquivobject StrictEquivtrait IeeeEquivobject IeeeEquivtrait StrictEquivobject DeprecatedFloatEquivobject StrictEquivobject Intobject Longobject Shortobject Stringobject Symbolobject Unitobject DeadlineIsOrderedobject DurationIsOrderedobject FiniteDurationIsOrderedtrait BigDecimalIsFractionalobject BigDecimalIsFractionaltrait DoubleIsFractionalobject DoubleIsFractionaltrait FloatIsFractionalobject FloatIsFractionaltrait BigDecimalAsIfIntegralobject BigDecimalAsIfIntegraltrait BigIntIsIntegralobject BigIntIsIntegraltrait ByteIsIntegralobject ByteIsIntegraltrait CharIsIntegralobject CharIsIntegraltrait IntIsIntegralobject IntIsIntegraltrait LongIsIntegralobject LongIsIntegraltrait ShortIsIntegralobject ShortIsIntegraltrait BigDecimalIsConflictedtrait BigDecimalOrderingobject BigDecimaltrait BigIntOrderingobject BigInttrait BooleanOrderingobject Booleantrait ByteOrderingobject Byteobject Inttrait CharOrderingobject Chartrait IeeeOrderingobject IeeeOrderingtrait TotalOrderingobject DeprecatedDoubleOrderingobject TotalOrderingtrait IeeeOrderingobject IeeeOrderingtrait TotalOrderingobject DeprecatedFloatOrderingobject TotalOrderingtrait IntOrderingtrait LongOrderingobject Longtrait ShortOrderingobject Shorttrait StringOrderingobject Stringtrait SymbolOrderingobject Symboltrait UnitOrderingobject Unit
Members list
In this article