@ParametersAreNonnullByDefault public static List<Size> filterBlackListedSizes(List<Size> sizes,String blacklistString){
  String[] blacklistStringArray=blacklistString.split(",");
  if (blacklistStringArray.length == 0) {
    return sizes;
  }
  Set<String> blacklistedSizes=new HashSet(Lists.newArrayList(blacklistStringArray));
  List<Size> newSizeList=new ArrayList<>();
  for (  Size size : sizes) {
    if (!isBlackListed(size,blacklistedSizes)) {
      newSizeList.add(size);
    }
  }
  return newSizeList;
}

@ ParametersAreNonnullByDefault public static List < Size > filterBlackListedSizes ( List < Size > sizes , String blacklistString ) { String [ ] blacklistStringArray = blacklistString . split ( "," ) ; if ( blacklistStringArray . length == 0 ) { return sizes ; } Set < String > blacklistedSizes = new HashSet ( Lists . newArrayList ( blacklistStringArray ) ) ; List < Size > newSizeList = new ArrayList < > ( ) ; for ( Size size : sizes ) { if ( ! isBlackListed ( size , blacklistedSizes ) ) { newSizeList . add ( size ) ; } } return newSizeList ; }
takes selected sizes and a list of blacklisted sizes . all the blacklistes sizes will be removed from the ' sizes ' list .
