#175 \\\'Queue\\\': please add \\\'first\\\', \\\'last\\\', \\\'next\\\', \\\'previous\\\'

v3.2.0
closed
David Ashley
Classes (154)
5
2012-08-14
2007-05-30
No

Please add to the ordered collection class "Queue" the following (order-specific) methods:

  • "first",
  • "last",
  • "next(idx)", and
  • "previous(idx)"

This is to match the respective protocol of the ordered collection classes "Array" and the "List".

Discussion

  • Rick McGuire
    Rick McGuire
    2007-05-30

    Logged In: YES
    user_id=1125291
    Originator: NO

    Committed revision 420.

    Not terribly useful methods, except for the polymorphism aspect. I made a number of internal changes to the queue code to support his better, so you might want to rerun any queue tests you have currently.

     
  • Logged In: YES
    user_id=662126
    Originator: YES

    Will test the queue class tomorrow (am dependent on Mark M. creating a new Windows version as at the moment I am not able to do that; also have not proceeded with moving to the new PCs as I thought I'd use the time to write up testcases and testsuites to help test the new features).

    [Also, as I am committing the testsuites after each new testsuite is "finished" to the point to test all the methods, you could run the testsuites for yourself: "oorexxunit.cls" needs to be on the path. Then you can individually run each ".testUnit" program with "rexx.exe". There is a "runTestSuites.rex" also, which expects a directory (e.g. ".") as an argument and has a "-r" switch; this would run all the ".testSuite" programs it finds.]

     
  • Rick McGuire
    Rick McGuire
    2007-06-20

    Logged In: YES
    user_id=1125291
    Originator: NO

    This adds first, last, next, and previous to the queue class. Model these off of the LIST versions, as they are very similar. The only special case might be FIRST, which will always return "1" for any non-empty QUEUE.

     


Anonymous


Cancel   Add attachments