posted 15 years ago
Say I have a class defined as follows:
and I want to implement the Comparable interface for it.
Are there any standard library utilities available for comparing two collection objects and returning a (-1, 0, 1) based on how those two Collections object compare to one another?
Or do I have to write my own helper/utility method to compare two Collection instances:
More generally speaking, what's best practice when dealing with such classes that have to be Comparable and that contain collections member fields?
Thanks.