RcpUtils.java
package com.mycim.utils;
import com.mycim.framework.utils.lang.StringUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author yangkeren
* @date 2022/3/1
**/
public class RcpUtils {
public final static String SUB_RECIPE_SEPARATOR = "-";
public static String getChamberTypeBySubRecipeId(String recipeId) {
String chamberType = StringUtils.substringAfterLast(recipeId,SUB_RECIPE_SEPARATOR);
return chamberType;
}
public static List<String> getChamberListBySubRecipeId(String recipeId) {
List<String> chamberList = new ArrayList<>();
String chamberType = StringUtils.substringAfterLast(recipeId,SUB_RECIPE_SEPARATOR);
if(StringUtils.isNotBlank(chamberType)) {
char[] chars = chamberType.toCharArray();
for (char chamber : chars) {
chamberList.add(String.valueOf(chamber));
}
}
return chamberList;
}
}