As I stated before in my post, I will be performing some peer-reviews for my 0.7 release. Today I looked at ArrayList() contains coded by clee. Here is a link to the lighthouse ticket, the processing reference which doesn’t really have anything about contains. I looked over the code (its a one liner, nice) and I also wrote a unit test. Basically, the purpose of this function is to quickly check if the arraylist contains the item (number, or string…) that is passed in.
The basis for my decision:
- the function returns the appropriate value.
- the function is written following the coding standards . Using 2 spaces instead of a tab, and leaving a space around brackets
- there is tests available to test the function
After reviewing the code I gave ArrayList.contains the status of super-review-requested.