isSorted() public method

This is used to optimize some stream operations, such as distinct(), which only needs constant memory when operating on a sorted list. Any stream operations that potentially change the sorting order should override this method to properly reflect the actual sorting order.
public isSorted ( ) : boolean
return boolean
Example #1
0
 public function testIsSortedWithArray()
 {
     $instance = new Stream([]);
     $this->assertFalse($instance->isSorted());
 }