synchronized Pair<String,Map<VariantSetType,List<Variant>>> nextSet() throws IOException {
  final Pair<String,Map<VariantSetType,List<Variant>>> set=mVariantSet.nextSet();
  if (set == null) {
    return null;
  }
  final String name=set.getA();
synchronized (mNames) {
    mNames.add(name);
  }
  return set;
}

synchronized Pair < String , Map < VariantSetType , List < Variant > > > nextSet ( ) throws IOException { final Pair < String , Map < VariantSetType , List < Variant > > > set = mVariantSet . nextSet ( ) ; if ( set == null ) { return null ; } final String name = set . getA ( ) ; synchronized ( mNames ) { mNames . add ( name ) ; } return set ; }
loads a set from the underlying variant set with synchronization .
