org.scalautils

NormalizingEquality

trait NormalizingEquality [A] extends Equality[A]

An Equality implementation that determines the equality of two objects by normalizing one or both objects, then comparing the results using an "after normalization" equality referenced from the afterNormalizationEquality member. By default, the afterNormalizationEquality is an instance of DefaultEquality.

import org.scalautils._

class StringEquality extends NormalizedEquality[String] { def isInstanceOfA(b: Any) = b.isInstanceOf[String] def normalized(s: String): String = s.trim.toLowerCase }

Self Type
NormalizingEquality[A]
Linear Supertypes
Equality[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. NormalizingEquality
  2. Equality
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Abstract Value Members

  1. def normalized (a: A): A

    Attributes
    abstract
  2. def normalizedIfInstanceOfA (b: Any): Any

    Attributes
    abstract

Concrete Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. val afterNormalizationEquality : Equality[A]

  7. def and (other: Normalization[A]): NormalizingEquality[A]

    Attributes
    final
  8. def areEqual (a: A, b: Any): Boolean

    Indicates whether the objects passed as a and b are equal.

    Indicates whether the objects passed as a and b are equal.

    a

    a left-hand-side object being compared with another (right-hand-side one) for equality (e.g., a == b)

    b

    a right-hand-side object being compared with another (left-hand-side one) for equality (e.g., a == b)

    returns

    true if the passed objects are "equal," as defined by this Equality instance

    Attributes
    final
    Definition Classes
    NormalizingEqualityEquality
  9. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  10. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  12. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  15. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  16. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  17. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  18. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  19. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  20. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  21. def toNormalization : Normalization[A]

    Attributes
    final
  22. def toString (): String

    Definition Classes
    AnyRef → Any
  23. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  25. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Equality[A]

Inherited from AnyRef

Inherited from Any