本文整理汇总了Java中org.apache.commons.lang3.text.WordUtils.uncapitalize方法的典型用法代码示例。如果您正苦于以下问题:Java WordUtils.uncapitalize方法的具体用法?Java WordUtils.uncapitalize怎么用?Java WordUtils.uncapitalize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.lang3.text.WordUtils
的用法示例。
在下文中一共展示了WordUtils.uncapitalize方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: determineName
import org.apache.commons.lang3.text.WordUtils; //导入方法依赖的package包/类
private String determineName(Method method) {
SearchIndex annotation = method.getAnnotation(SearchIndex.class);
String name = annotation == null ? null : annotation.value();
if (StringUtils.isBlank(name)) {
name = method.getName();
if (name.startsWith("is")) {
name = WordUtils.uncapitalize(name.substring(2));
} else if (name.startsWith("get")) {
name = WordUtils.uncapitalize(name.substring(3));
}
}
return name;
}
示例2: of
import org.apache.commons.lang3.text.WordUtils; //导入方法依赖的package包/类
@SuppressWarnings("PMD.ShortMethodName")
public static String of(Class<? extends Element> elementType) {
String label = alias(elementType, Alias::label);
if (label == null) {
label = name(elementType);
if (is(elementType, Edge.class)) {
label = WordUtils.uncapitalize(label);
}
}
return label;
}
示例3: createModelicaName
import org.apache.commons.lang3.text.WordUtils; //导入方法依赖的package包/类
@Override
public void createModelicaName(ModExportContext modContext, DDBManager ddbManager, SimulatorInst modelicaSim) {
String modelicaName = DEFAULT_CAPACITOR_PREFIX + "_" + parseName(this.capacitor.getId());
modelicaName = WordUtils.uncapitalize(modelicaName.substring(0, 1)) + modelicaName.substring(1);
modelicaName = StaticData.PREF_CAP + modelicaName;
modContext.dictionary.add(capacitor, modelicaName);
super.setModelicaName(modelicaName);
}
示例4: toString
import org.apache.commons.lang3.text.WordUtils; //导入方法依赖的package包/类
@Override
public String toString(Object inputObject, String format) {
String input = inputObject.toString();
switch (format) {
case "upcase":
return input.substring(0, 1).toUpperCase() + input.substring(1);
case "uncapitalize":
return WordUtils.uncapitalize(input);
case "lower":
return input.toLowerCase();
case "upper":
return input.toUpperCase();
}
return input;
}
示例5: bindEntity
import org.apache.commons.lang3.text.WordUtils; //导入方法依赖的package包/类
/**
* Add given class to dictionary.
*
* @param cls Entity bean class
*/
@Override
public void bindEntity(Class<?> cls) {
String type = WordUtils.uncapitalize(cls.getSimpleName());
Class<?> duplicate = bindJsonApiToEntity.put(type, cls);
if (duplicate != null && !duplicate.equals(cls)) {
log.error("Duplicate binding {} for {}, {}", type, cls, duplicate);
throw new DuplicateMappingException(type + " " + cls.getName() + ":" + duplicate.getName());
}
entityBindings.put(cls, new EntityBinding(this, cls, type, type));
}
示例6: getFieldnameFromGetter
import org.apache.commons.lang3.text.WordUtils; //导入方法依赖的package包/类
public static String getFieldnameFromGetter(final String methodName) {
return WordUtils.uncapitalize(StringUtils.removeStart(methodName, "get"));
}
示例7: createModelicaName
import org.apache.commons.lang3.text.WordUtils; //导入方法依赖的package包/类
@Override
public void createModelicaName(ModExportContext modContext, DDBManager ddbManager, SimulatorInst modelicaSim) {
Equipments.ConnectionInfo terminal1Info = Equipments.getConnectionInfoInBusBreakerView(branch.getTerminal1());
Equipments.ConnectionInfo terminal2Info = Equipments.getConnectionInfoInBusBreakerView(branch.getTerminal2());
bus1 = terminal1Info.getConnectionBus();
bus2 = terminal2Info.getConnectionBus();
//System.out.println("Trafo: " + this.branch.getId() + ". Terminal 1: " + bus1.getId() + ". Terminal 2: " + bus2.getId());
nodeName1 = parseName(bus1.getId());
nodeName2 = parseName(bus2.getId());
String branchName = parseName(branch.getId()); //CIM ID
String modelicaName = DEFAULT_BRANCH_PREFIX + branchName; //CIM ID
modelicaName = WordUtils.uncapitalize(modelicaName.substring(0, 1)) + modelicaName.substring(1);
// modelicaName = parseName(modelicaName); //Añadido de cara al conversor de PSSE
modContext.dictionary.add(branch, modelicaName);
super.setModelicaName(modelicaName);
ModelTemplate model = null;
String ddbid = StaticData.MTC_PREFIX_NAME + super.mtcMapper.get(DEFAULT_BRANCH_PREFIX.substring(0, 1).toUpperCase() + DEFAULT_BRANCH_PREFIX);
ModelTemplateContainer mtc = ddbManager.findModelTemplateContainer(ddbid);
if (mtc == null) {
// LOGGER.warn("EUROSTAG Model Template Container does not exist. Searching Default MODELICA Model Template Container in DDB.");
mtc = ddbManager.findModelTemplateContainer(StaticData.MTC_PREFIX_NAME + DEFAULT_BRANCH_TYPE);
}
if (mtc != null) {
for (ModelTemplate mt : mtc.getModelTemplates()) {
if (mt.getTypeName().equalsIgnoreCase(DEFAULT_BRANCH_TYPE)) {
model = mt;
}
}
if (model != null) {
super.setModelicaType(model.getTypeName());
} else {
super.setCorrect(false);
LOGGER.error("MODELICA Model Template does not exist in DDB.");
}
} else {
super.setCorrect(false);
// LOGGER.error("MODELICA Model Template Container does not exist in DDB.");
}
}
示例8: setDEFAULT_BRANCH_PREFIX
import org.apache.commons.lang3.text.WordUtils; //导入方法依赖的package包/类
public void setDEFAULT_BRANCH_PREFIX(String defaultBranchPrefix) {
DEFAULT_BRANCH_PREFIX = WordUtils.uncapitalize(defaultBranchPrefix.substring(0, 1)) + defaultBranchPrefix.substring(1);
}