[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Originally posted by Jeanne Boyarsky:
You can write your own comparator with the desired implementation and pass it to the HashSet to get the desired functionality.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Set<int[]> shapeA = new HashSet<int[]>();
Set<int[]> shapeB = new HashSet<int[]>();
Set<int[]> shapeC = new HashSet<int[]>();
...
shapeA.addAll(Arrays.asList(arrayA));
shapeB.addAll(Arrays.asList(arrayB));
shapeC.addAll(Arrays.asList(arrayC));
Author of <a href="http://www.newsinjector.com" target="_blank" rel="nofollow">NewsInjector</a>
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Author of <a href="http://www.newsinjector.com" target="_blank" rel="nofollow">NewsInjector</a>
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
You would be much easier to understand if you took that bucket off of your head. And that goes for the tiny ad too!
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|