当前位置: 首页>>代码示例>>Java>>正文


Java WordUtils.uncapitalize方法代码示例

本文整理汇总了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;
}
 
开发者ID:monPlan,项目名称:springboot-spwa-gae-demo,代码行数:14,代码来源:SearchMetadata.java

示例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;
}
 
开发者ID:karthicks,项目名称:gremlin-ogm,代码行数:12,代码来源:Label.java

示例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);
}
 
开发者ID:itesla,项目名称:ipst,代码行数:9,代码来源:CapacitorRecord.java

示例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;
}
 
开发者ID:RapturePlatform,项目名称:Rapture,代码行数:16,代码来源:UpCaseRenderer.java

示例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));
}
 
开发者ID:yahoo,项目名称:elide,代码行数:19,代码来源:NonEntityDictionary.java

示例6: getFieldnameFromGetter

import org.apache.commons.lang3.text.WordUtils; //导入方法依赖的package包/类
public static String getFieldnameFromGetter(final String methodName) {
  return WordUtils.uncapitalize(StringUtils.removeStart(methodName, "get"));
}
 
开发者ID:camunda,项目名称:camunda-bpm-swagger,代码行数:4,代码来源:StringHelper.java

示例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.");
        }
    }
 
开发者ID:itesla,项目名称:ipst,代码行数:50,代码来源:BranchRecord.java

示例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);
}
 
开发者ID:itesla,项目名称:ipst,代码行数:4,代码来源:BranchRecord.java


注:本文中的org.apache.commons.lang3.text.WordUtils.uncapitalize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。