classical set operations java.util.collection
is there any built-in functionality model set operations java.util.collection class? specific doing arraylist, nonetheless sounds something should ask subclasses collection. i'm looking something like:
arraylist<integer> seta ...
arraylist<integer> setb ...
arraylist<integer> setaintersectionb = seta.intersection(setb);
arraylist<integer> setaminusb = seta.subtract(setb);
after searching, i wholly means home-grown solutions. also, i comprehend i competence fraudulent thought "set" thought "collection", permitting allowing duplicates respectively. maybe unequivocally only functionality set interface?
in eventuality nobody knows any built-in functionality, maybe repository customary use java set operation code? i suspect circle reinvented countless times.
Comments
Post a Comment