public static void processACleanup(Set<CLEANUP_CATEGORY> categories, List<TCleanup.Category.Enum> categoryList) { if( categoryList.isEmpty() ) { // add all categories categories.addAll(EnumSet.allOf(CLEANUP_CATEGORY.class)); } else { for( TCleanup.Category.Enum aCategory : categoryList ) { if( aCategory == TCleanup.Category.ALL) { // add all categories categories.addAll(EnumSet.allOf(CLEANUP_CATEGORY.class)); } else { categories.add(CLEANUP_CATEGORY.fromString(aCategory.toString())); } } } }
if (sucCategoryListType != null && sucCategoryListType.getCategory() != null) { for (Category_type1 categoryType1 : sucCategoryListType.getCategory()) { sucessCategoryList.add(TCleanup.Category.Enum.forString(categoryType1.getValue())); if (failCategoryListType != null && failCategoryListType.getCategory() != null) { for (Category_type1 categoryType1 : failCategoryListType.getCategory()) { failCategoryList.add(TCleanup.Category.Enum.forString(categoryType1.getValue()));
public static void processACleanup(Set<CLEANUP_CATEGORY> categories, List<TCleanup.Category.Enum> categoryList) { if( categoryList.isEmpty() ) { // add all categories categories.addAll(EnumSet.allOf(CLEANUP_CATEGORY.class)); } else { for( TCleanup.Category.Enum aCategory : categoryList ) { if( aCategory == TCleanup.Category.ALL) { // add all categories categories.addAll(EnumSet.allOf(CLEANUP_CATEGORY.class)); } else { categories.add(CLEANUP_CATEGORY.fromString(aCategory.toString())); } } } }