Equiv

scala.math.Equiv
See theEquiv companion object
trait Equiv[T] extends 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:

  1. reflexive: equiv(x, x) == true for any x of type T.

  2. symmetric: equiv(x, y) == equiv(y, x) for any x and y of type T.

  3. transitive: if equiv(x, y) == true and equiv(y, z) == true, then equiv(x, z) == true for any x, y, and z of type T.

Attributes

Companion
object
Source
Equiv.scala
Graph
Supertypes
trait Serializable
class Any
Known subtypes
object BigDecimal.type
object BigInt.type
object Boolean.type
object Byte.type
object Char.type
trait IeeeEquiv
object IeeeEquiv.type
trait StrictEquiv
object DeprecatedDoubleEquiv.type
object StrictEquiv.type
trait IeeeEquiv
object IeeeEquiv.type
trait StrictEquiv
object DeprecatedFloatEquiv.type
object StrictEquiv.type
object Int.type
object Long.type
object Short.type
object String.type
object Symbol.type
object Unit.type
trait PartialOrdering[T]
trait Ordering[T]
object DeadlineIsOrdered.type
object DurationIsOrdered.type
object ValueOrdering.type
trait Numeric[T]
trait Fractional[T]
object DoubleIsFractional.type
object FloatIsFractional.type
trait Integral[T]
object BigIntIsIntegral.type
object ByteIsIntegral.type
object CharIsIntegral.type
object IntIsIntegral.type
object LongIsIntegral.type
object ShortIsIntegral.type
object BigDecimal.type
object BigInt.type
object Boolean.type
trait ByteOrdering
object Byte.type
trait CachedReverse[T]
object Int.type
trait CharOrdering
object Char.type
trait IeeeOrdering
object IeeeOrdering.type
object TotalOrdering.type
trait IeeeOrdering
object IeeeOrdering.type
object TotalOrdering.type
trait IntOrdering
trait LongOrdering
object Long.type
trait OptionOrdering[T]
object Short.type
object String.type
object Symbol.type
trait UnitOrdering
object Unit.type
Show all

Members list

Value members

Abstract methods

def equiv(x: T, y: T): Boolean
Implicitly added by Option

Returns true iff x is equivalent to y.

Returns true iff x is equivalent to y.

Attributes

Source
Equiv.scala
def equiv(x: T, y: T): Boolean

Returns true iff x is equivalent to y.

Returns true iff x is equivalent to y.

Attributes

Source
Equiv.scala