public static < OutputType , Type1 , Type2 > Set < OutputType > joinSets ( Set < Type1 > set1 , Function < Type1 , OutputType > converter1 , Set < Type2 > set2 , Function < Type2 , OutputType > converter2 ) { return new ConvertedSetView <> ( set1 , converter1 , set2 , converter2 ) ; }
Returns an unmodifiable Set View made up of the given Sets while translating the items into a common type . The returned Set View does not copy any of the data from any of the given Sets therefore any changes in the two Sets will be reflected in the View .