It's not terribly clean, but you could use indexOf() and check if it returns -1. Better than breaking out a loop.
Obi Ezechukwu‘s blog High-Octane Java recently featured the post Compact Equals, which compares an implementation of a Java class’s overridden equals method in traditional form versus one implemented ...
Results that may be inaccessible to you are currently showing.
Hide inaccessible results