org.scalactic

OrderingEquality

trait OrderingEquality[A] extends HashingEquality[A]

A HashingEquality[T] that offers a compare method that indicates whether two objects of type T are greater than, less than, or equal to each other.

Instances of this trait must define a total ordering on objects of type T that is consistent with areEqual according to the following:

Source
OrderingEquality.scala
Linear Supertypes
HashingEquality[A], Equality[A], Equivalence[A], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. OrderingEquality
  2. HashingEquality
  3. Equality
  4. Equivalence
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract 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 value being compared with another (right-hand-side one) for equality (e.g., a == b)

    b

    a right-hand value 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

    Definition Classes
    Equality
  2. abstract def compare(a: A, b: A): Int

    Returns an integer whose sign indicates how x compares to y.

    Returns an integer whose sign indicates how x compares to y.

    The result sign has the following meaning:

    • negative if x < y
    • positive if x > y
    • zero otherwise (if areEqual(x, y))

    For more detail on the contract of this method, see the main documentation for this trait.

  3. abstract def hashCodeFor(a: A): Int

    Returns a hash code for the specified object that is consistent with areEqual.

    Returns a hash code for the specified object that is consistent with areEqual.

    See the main documentation of this trait for more detail on the contract of hashCodeFor.

    Definition Classes
    HashingEquality

Concrete Value Members

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

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

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

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

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

    Definition Classes
    Any
  6. final def areEquivalent(a: A, b: A): Boolean

    A final implementation of the areEquivalent method of Equivalence that just passes a and b to areEqual and returns the result.

    A final implementation of the areEquivalent method of Equivalence that just passes a and b to areEqual and returns the result.

    This method enables any Equality to be used where an Equivalence is needed, such as the implicit enabling methods of TypeCheckedTripleEquals and ConversionCheckedTripleEquals.

    a

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

    b

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

    returns

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

    Definition Classes
    EqualityEquivalence
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

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

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

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

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

    Definition Classes
    AnyRef → Any
  13. final def gt(a: A, b: A): Boolean

    Returns true if a > b in the total order defined by this OrderingEquality.

    Returns true if a > b in the total order defined by this OrderingEquality.

  14. final def gteq(a: A, b: A): Boolean

    Returns true if a >= b in the total order defined by this OrderingEquality.

    Returns true if a >= b in the total order defined by this OrderingEquality.

  15. def hashCode(): Int

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

    Definition Classes
    Any
  17. final def lt(a: A, b: A): Boolean

    Returns true if a < b in the total order defined by this OrderingEquality.

    Returns true if a < b in the total order defined by this OrderingEquality.

  18. final def lteq(a: A, b: A): Boolean

    Returns true if a <= b in the total order defined by this OrderingEquality.

    Returns true if a <= b in the total order defined by this OrderingEquality.

  19. final def max(a: A, b: A): A

    Returns a if a >= b, otherwise b, according to the total order defined by this OrderingEquality.

    Returns a if a >= b, otherwise b, according to the total order defined by this OrderingEquality.

  20. final def min(a: A, b: A): A

    Returns a if a <= b, otherwise b, according to the total order defined by this OrderingEquality.

    Returns a if a <= b, otherwise b, according to the total order defined by this OrderingEquality.

  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

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

    Definition Classes
    AnyRef
  25. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from HashingEquality[A]

Inherited from Equality[A]

Inherited from Equivalence[A]

Inherited from AnyRef

Inherited from Any

Ungrouped