io.github.yangyouwang.core.ArrayWrapper Maven / Gradle / Ivy
package io.github.yangyouwang.core;
import java.util.HashMap;
import java.util.Map;
/**
* Array Wrap
* @author yangyouwang
*/
public class ArrayWrapper extends BaseReflexWrapper {
@Override
protected Map wrapTheType(String dictName, String dictData, String fieldName, String fieldValue) {
String[] dict = dictData.split(":");
Map result = new HashMap<>(16);
if (fieldValue.equals(dict[0])) {
if (dictName.isEmpty()) {
result.put(fieldName, dict[1]);
return result;
}
result.put(dictName, dict[1]);
}
return result;
}
}