scala.math

# Equiv

#### 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`.

Version

  1.0, 2008-04-03

Since

  2.7

Linear Supertypes
Serializable, java.io.Serializable, Any
Known Subclasses
BigDecimal, BigDecimalAsIfIntegral, BigDecimalAsIfIntegral, BigDecimalIsConflicted, BigDecimalIsFractional, BigDecimalIsFractional, BigDecimalOrdering, BigInt, BigIntIsIntegral, BigIntIsIntegral, BigIntOrdering, Boolean, BooleanOrdering, Byte, ByteIsIntegral, ByteIsIntegral, ByteOrdering, Char, CharIsIntegral, CharIsIntegral, CharOrdering, DeadlineIsOrdered, Double, DoubleAsIfIntegral, DoubleAsIfIntegral, DoubleIsConflicted, DoubleIsFractional, DoubleIsFractional, DoubleOrdering, DurationIsOrdered, FiniteDurationIsOrdered, Float, FloatAsIfIntegral, FloatAsIfIntegral, FloatIsConflicted, FloatIsFractional, FloatIsFractional, FloatOrdering, Fractional, Int, IntIsIntegral, IntIsIntegral, IntOrdering, Integral, Long, LongIsIntegral, LongIsIntegral, LongOrdering, Numeric, OptionOrdering, Ordering, PartialOrdering, Short, ShortIsIntegral, ShortIsIntegral, ShortOrdering, String, StringOrdering, Unit, UnitOrdering, ValueOrdering
Type Hierarchy Learn more about scaladoc diagrams
Ordering

1. Alphabetic
2. By inheritance

Inherited

1. Equiv
2. Serializable
3. Serializable
4. Any

Implicitly

1. by any2stringadd
2. by StringFormat
3. by Ensuring
4. by ArrowAssoc

1. Hide All
2. Show all

Learn more about member selection
Visibility

1. Public
2. All

### Abstract Value Members

1. #### abstract def equiv(x: T, y: T): Boolean

   Returns `true` iff `x` is equivalent to `y`.

2. #### abstract def getClass(): Class[_]

   Definition Classes
     Any

### Concrete Value Members

1. #### final def !=(arg0: Any): Boolean

   Definition Classes
     Any

2. #### final def ##(): Int

   Definition Classes
     Any

3. #### def +(other: String): String

   Implicit information
     This member is added by an implicit conversion from Equiv[T] to any2stringadd[Equiv[T]] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd

4. #### def ->[B](y: B): (Equiv[T], B)

   Implicit information
     This member is added by an implicit conversion from Equiv[T] to ArrowAssoc[Equiv[T]] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()

5. #### final def ==(arg0: Any): Boolean

   Definition Classes
     Any

6. #### final def asInstanceOf[T0]: T0

   Definition Classes
     Any

7. #### def ensuring(cond: (Equiv[T]) ⇒ Boolean, msg: ⇒ Any): Equiv[T]

   Implicit information
     This member is added by an implicit conversion from Equiv[T] to Ensuring[Equiv[T]] performed by method Ensuring in scala.Predef.
   Definition Classes
     Ensuring

8. #### def ensuring(cond: (Equiv[T]) ⇒ Boolean): Equiv[T]

   Implicit information
     This member is added by an implicit conversion from Equiv[T] to Ensuring[Equiv[T]] performed by method Ensuring in scala.Predef.
   Definition Classes
     Ensuring

9. #### def ensuring(cond: Boolean, msg: ⇒ Any): Equiv[T]

   Implicit information
     This member is added by an implicit conversion from Equiv[T] to Ensuring[Equiv[T]] performed by method Ensuring in scala.Predef.
   Definition Classes
     Ensuring

10. #### def ensuring(cond: Boolean): Equiv[T]

    Implicit information
      This member is added by an implicit conversion from Equiv[T] to Ensuring[Equiv[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring

11. #### def equals(arg0: Any): Boolean

    Definition Classes
      Any

12. #### def formatted(fmtstr: String): String

    Returns string formatted according to given `format` string.

    Returns string formatted according to given `format` string. Format strings are as for `String.format` (@see java.lang.String.format).

    Implicit information
      This member is added by an implicit conversion from Equiv[T] to StringFormat[Equiv[T]] performed by method StringFormat in scala.Predef.
    Definition Classes
      StringFormat
    Annotations
      @inline()

13. #### def hashCode(): Int

    Definition Classes
      Any

14. #### final def isInstanceOf[T0]: Boolean

    Definition Classes
      Any

15. #### def toString(): String

    Definition Classes
      Any

16. #### def →[B](y: B): (Equiv[T], B)

    Implicit information
      This member is added by an implicit conversion from Equiv[T] to ArrowAssoc[Equiv[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
      ArrowAssoc

### Inherited from Serializable

### Inherited from java.io.Serializable

### Inherited from Any

### Inherited by implicit conversion any2stringadd from Equiv[T] to any2stringadd[Equiv[T]]

### Inherited by implicit conversion StringFormat from Equiv[T] to StringFormat[Equiv[T]]

### Inherited by implicit conversion Ensuring from Equiv[T] to Ensuring[Equiv[T]]

### Inherited by implicit conversion ArrowAssoc from Equiv[T] to ArrowAssoc[Equiv[T]]

### Ungrouped