public MediaTypes merge(final MediaTypes types){
  final SortedSet<MediaType> set=new TreeSet<>();
  set.addAll(this.list);
  set.addAll(types.list);
  return new MediaTypes(set);
}

public MediaTypes merge ( final MediaTypes types ) { final SortedSet < MediaType > set = new TreeSet < > ( ) ; set . addAll ( this . list ) ; set . addAll ( types . list ) ; return new MediaTypes ( set ) ; }
merge with this one .
