defaultFor

Returns Equality instance which Equality.equalsTo operator just uses Any.equals operator's result as a return value.

This provides structural equality semantics based on the standard Any.equals method.

Return

An Equality instance that uses structural equality (==) for comparisons.

Type Parameters

Element

The type of elements for which to create the default equality context.


Returns Hashing instance which Hashing.hash operator just uses Any.hashCode operator's result as a return value.

This provides a default hashing context that uses the standard Any.hashCode method.

Return

A Hashing instance that uses the standard hash code computation.

Type Parameters

Element

The type of elements for which to create the default hashing context.


Returns Order instance which Order.compareTo operator just uses Comparable.compareTo operator's result as a return value.

This provides a default order context for types that implement Comparable.

Receiver

The order companion object.

Return

An Order instance that uses the natural ordering of comparable elements.

Type Parameters

Element

The comparable element type for which to create the default order context.


Returns Comparator instance which Comparator.compare operator just uses Comparable.compareTo operator's result as a return value.

This provides a default comparator for types that implement Comparable.

Receiver

The comparator companion object.

Return

A Comparator instance that uses the natural ordering of comparable elements.

Type Parameters

Element

The comparable element type for which to create the default comparator.


Reification builder from a reified type Element that is used to cast elements.

Creates a reification context that checks if elements are of the specified type Element using Kotlin's reified type checks.

Receiver

The reification companion object.

Return

A Reification instance that uses type checking for domain verification.

Type Parameters

Element

The reified type to check against.