Open Journal Systems  3.3.0
Seboettg\Collection\Comparable Interface Reference
Inheritance diagram for Seboettg\Collection\Comparable:
Seboettg\Collection\Test\Element

Public Member Functions

 compareTo (Comparable $b)
 

Detailed Description

Definition at line 24 of file Comparable.php.

Member Function Documentation

◆ compareTo()

Seboettg\Collection\Comparable::compareTo ( Comparable  $b)

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure sgn(x.compareTo(y)) == -sgn(y.compareTo(x)) for all x and y.

Parameters
Comparable$b
Returns
int

Implemented in Seboettg\Collection\Test\Element.

Referenced by Seboettg\Collection\Test\MyAscendingComparator\compare(), Seboettg\Collection\Test\MyDescendingComparator\compare(), Seboettg\Collection\Test\ArrayListTest\testCompareTo(), and Seboettg\Collection\Test\ArrayListTest\testShuffle().


The documentation for this interface was generated from the following file: