public int size ( ) { // Since the sets are disjoint, we can simple sum their sizes int size = 0 ; for ( Set < T > s : sets ) size += s . size ( ) ; return size ; }
Returns the number of unique items across all sets .