--- a/Interval.st Sat Feb 09 15:06:39 2019 +0100
+++ b/Interval.st Sat Feb 09 15:26:54 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -473,6 +475,27 @@
!Interval methodsFor:'queries'!
+isEmpty
+ "return true, if the receiver is empty"
+
+ step > 0 ifTrue:[
+ ^ stop < start
+ ].
+ ^ stop > start
+
+ "
+ self assert:(1 to:1) isEmpty not
+ self assert:(1 to:0) isEmpty
+ self assert:(0 to:1) isEmpty not
+
+ self assert:(1 to:1 by:-1) isEmpty not
+ self assert:(1 to:0 by:-1) isEmpty not
+ self assert:(0 to:1 by:-1) isEmpty
+ "
+
+ "Created: / 09-02-2019 / 15:24:32 / Claus Gittinger"
+!
+
max
"return the maximum value in the receiver collection,
redefined, since this can be easily computed.