You can always make subclass of Interval for example OpenedInterval , add two variables: left and right.Make new methods:<br>OpenedInterval&gt;&gt;from: aNumber to: aNumber left: aBoolean<br>OpenedInterval&gt;&gt;from: aNumber to: aNumber right: aBoolean<br>
OpenedInterval&gt;&gt;from: aNumber to: aNumber left: aBoolean right: aBoolean<br><br>they should create standard Interval and write aBoolean to variables left and right; lets say that true for opened form left/right and false for closed. Then add methods<br>
OpenedInterval&gt;&gt;includes: aNumber<br>that checks if aNumber is one of borders and founds if left or right is opened/closed. If aNumber is border which should be closed, then uses super include, else answer false. Easy, aint it?<br>
You can add accessors and setters for left and right, so that you can open/close intervals without making new one, and check state of variables.<br><br>You know, you gave me some ideas, that I would be pleased to work out :P I will make this class up and make it public ;)<br>
<br>-- <br>Pozdrawiam:<br>Filip<br>GG: 2486889<br>mail: <a href="mailto:filet00@gmail.com">filet00@gmail.com</a><br>