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


Java StringUtils.uncapitalize方法代码示例

本文整理汇总了Java中org.apache.commons.lang.StringUtils.uncapitalize方法的典型用法代码示例。如果您正苦于以下问题:Java StringUtils.uncapitalize方法的具体用法?Java StringUtils.uncapitalize怎么用?Java StringUtils.uncapitalize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.lang.StringUtils的用法示例。


在下文中一共展示了StringUtils.uncapitalize方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MutableStat

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
/**
 * Construct a sample statistics metric
 * @param name        of the metric
 * @param description of the metric
 * @param sampleName  of the metric (e.g. "Ops")
 * @param valueName   of the metric (e.g. "Time", "Latency")
 * @param extended    create extended stats (stdev, min/max etc.) by default.
 */
public MutableStat(String name, String description,
                   String sampleName, String valueName, boolean extended) {
  String ucName = StringUtils.capitalize(name);
  String usName = StringUtils.capitalize(sampleName);
  String uvName = StringUtils.capitalize(valueName);
  String desc = StringUtils.uncapitalize(description);
  String lsName = StringUtils.uncapitalize(sampleName);
  String lvName = StringUtils.uncapitalize(valueName);
  numInfo = info(ucName +"Num"+ usName, "Number of "+ lsName +" for "+ desc);
  iNumInfo = info(ucName +"INum"+ usName,
                  "Interval number of "+ lsName +" for "+ desc);
  avgInfo = info(ucName +"Avg"+ uvName, "Average "+ lvName +" for "+ desc);
  stdevInfo = info(ucName +"Stdev"+ uvName,
                   "Standard deviation of "+ lvName +" for "+ desc);
  iMinInfo = info(ucName +"IMin"+ uvName,
                  "Interval min "+ lvName +" for "+ desc);
  iMaxInfo = info(ucName + "IMax"+ uvName,
                  "Interval max "+ lvName +" for "+ desc);
  minInfo = info(ucName +"Min"+ uvName, "Min "+ lvName +" for "+ desc);
  maxInfo = info(ucName +"Max"+ uvName, "Max "+ lvName +" for "+ desc);
  this.extended = extended;
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:31,代码来源:MutableStat.java

示例2: MutableStat

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
/**
 * Construct a sample statistics metric
 * @param name        of the metric
 * @param description of the metric
 * @param sampleName  of the metric (e.g. "Ops")
 * @param valueName   of the metric (e.g. "Time", "Latency")
 * @param extended    create extended stats (stdev, min/max etc.) by default.
 */
public MutableStat(String name, String description,
                   String sampleName, String valueName, boolean extended) {
  String ucName = StringUtils.capitalize(name);
  String usName = StringUtils.capitalize(sampleName);
  String uvName = StringUtils.capitalize(valueName);
  String desc = StringUtils.uncapitalize(description);
  String lsName = StringUtils.uncapitalize(sampleName);
  String lvName = StringUtils.uncapitalize(valueName);
  numInfo = info(ucName +"Num"+ usName, "Number of "+ lsName +" for "+ desc);
  avgInfo = info(ucName +"Avg"+ uvName, "Average "+ lvName +" for "+ desc);
  stdevInfo = info(ucName +"Stdev"+ uvName,
                   "Standard deviation of "+ lvName +" for "+ desc);
  iMinInfo = info(ucName +"IMin"+ uvName,
                  "Interval min "+ lvName +" for "+ desc);
  iMaxInfo = info(ucName + "IMax"+ uvName,
                  "Interval max "+ lvName +" for "+ desc);
  minInfo = info(ucName +"Min"+ uvName, "Min "+ lvName +" for "+ desc);
  maxInfo = info(ucName +"Max"+ uvName, "Max "+ lvName +" for "+ desc);
  this.extended = extended;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:29,代码来源:MutableStat.java

示例3: apply

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
public void apply(String taskName) {
    if (taskName.startsWith(PREFIX)) {
        String configurationName = StringUtils.uncapitalize(taskName.substring(PREFIX.length()));
        Configuration configuration = configurations.findByName(configurationName);

        if (configuration != null) {
            Task task = tasks.create(taskName);
            task.dependsOn(configuration.getAllArtifacts());
            task.setDescription("Builds the artifacts belonging to " + configuration + ".");
        }
    }
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:13,代码来源:BuildConfigurationRule.java

示例4: MutableQuantiles

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
/**
 * Instantiates a new {@link MutableQuantiles} for a metric that rolls itself
 * over on the specified time interval.
 * 
 * @param name
 *          of the metric
 * @param description
 *          long-form textual description of the metric
 * @param sampleName
 *          type of items in the stream (e.g., "Ops")
 * @param valueName
 *          type of the values
 * @param interval
 *          rollover interval (in seconds) of the estimator
 */
public MutableQuantiles(String name, String description, String sampleName,
    String valueName, int interval) {
  String ucName = StringUtils.capitalize(name);
  String usName = StringUtils.capitalize(sampleName);
  String uvName = StringUtils.capitalize(valueName);
  String desc = StringUtils.uncapitalize(description);
  String lsName = StringUtils.uncapitalize(sampleName);
  String lvName = StringUtils.uncapitalize(valueName);

  numInfo = info(ucName + "Num" + usName, String.format(
      "Number of %s for %s with %ds interval", lsName, desc, interval));
  // Construct the MetricsInfos for the quantiles, converting to percentiles
  quantileInfos = new MetricsInfo[quantiles.length];
  String nameTemplate = ucName + "%dthPercentile" + uvName;
  String descTemplate = "%d percentile " + lvName + " with " + interval
      + " second interval for " + desc;
  for (int i = 0; i < quantiles.length; i++) {
    int percentile = (int) (100 * quantiles[i].quantile);
    quantileInfos[i] = info(String.format(nameTemplate, percentile),
        String.format(descTemplate, percentile));
  }

  estimator = new SampleQuantiles(quantiles);

  this.interval = interval;
  scheduler.scheduleAtFixedRate(new RolloverSample(this), interval, interval,
      TimeUnit.SECONDS);
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:44,代码来源:MutableQuantiles.java

示例5: prepareNameString

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
/**
 * Prepare camelcase name
 *
 * @param nameString string to convert to camel case
 * @return camelcase string
 */
public static String prepareNameString(String nameString) {
    nameString = underscores(nameString).replaceAll("\\W", "_").toLowerCase();
    nameString = Arrays.stream(nameString.split("_")).map(StringUtils::capitalize).collect(Collectors.joining());
    nameString = StringUtils.uncapitalize(nameString);
    return nameString;
}
 
开发者ID:nds842,项目名称:sql-first-mapper,代码行数:13,代码来源:MiscUtils.java

示例6: MutableHistogram

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
public MutableHistogram(String name, String description) {
  this.name = StringUtils.capitalize(name);
  this.desc = StringUtils.uncapitalize(description);
  sample = new ExponentiallyDecayingSample(DEFAULT_SAMPLE_SIZE, DEFAULT_ALPHA);
  count = new AtomicLong();
  min = new AtomicLong(Long.MAX_VALUE);
  max = new AtomicLong(Long.MIN_VALUE);
  sum = new AtomicLong();
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:10,代码来源:MutableHistogram.java

示例7: MetricMutableQuantiles

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
/**
 * Instantiates a new {@link MetricMutableQuantiles} for a metric that rolls itself over on the
 * specified time interval.
 *
 * @param name        of the metric
 * @param description long-form textual description of the metric
 * @param sampleName  type of items in the stream (e.g., "Ops")
 * @param valueName   type of the values
 * @param interval    rollover interval (in seconds) of the estimator
 */
public MetricMutableQuantiles(String name, String description, String sampleName,
                              String valueName, int interval) {
  String ucName = StringUtils.capitalize(name);
  String usName = StringUtils.capitalize(sampleName);
  String uvName = StringUtils.capitalize(valueName);
  String desc = StringUtils.uncapitalize(description);
  String lsName = StringUtils.uncapitalize(sampleName);
  String lvName = StringUtils.uncapitalize(valueName);

  numInfo = info(ucName + "Num" + usName, String.format(
      "Number of %s for %s with %ds interval", lsName, desc, interval));
  // Construct the MetricsInfos for the quantiles, converting to percentiles
  quantileInfos = new MetricsInfo[quantiles.length];
  String nameTemplate = "%s%dthPercentile%dsInterval%s";
  String descTemplate = "%d percentile %s with %d second interval for %s";
  for (int i = 0; i < quantiles.length; i++) {
    int percentile = (int) (100 * quantiles[i].quantile);
    quantileInfos[i] = info(String.format(nameTemplate, ucName, percentile, interval, uvName),
        String.format(descTemplate, percentile, lvName, interval, desc));
  }

  estimator = new MetricSampleQuantiles(quantiles);
  executor = new MetricsExecutorImpl();
  this.interval = interval;
  executor.getExecutor().scheduleAtFixedRate(new RolloverSample(this),
      interval,
      interval,
      TimeUnit.SECONDS);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:40,代码来源:MetricMutableQuantiles.java

示例8: createHeader

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
@Override
protected String createHeader(Project project) {
    String header = super.createHeader(project);
    return "All tasks runnable from " + StringUtils.uncapitalize(header);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:6,代码来源:TaskReportRenderer.java

示例9: getCompileConfigurationName

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
public String getCompileConfigurationName() {
    return StringUtils.uncapitalize(getTaskBaseName() + "Compile");
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DefaultSourceSet.java

示例10: getRuntimeConfigurationName

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
public String getRuntimeConfigurationName() {
    return StringUtils.uncapitalize(getTaskBaseName() + "Runtime");
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DefaultSourceSet.java

示例11: getCompileOnlyConfigurationName

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
public String getCompileOnlyConfigurationName() {
    return StringUtils.uncapitalize(getTaskBaseName() + "CompileOnly");
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DefaultSourceSet.java

示例12: getCompileClasspathConfigurationName

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
@Override
public String getCompileClasspathConfigurationName() {
    return StringUtils.uncapitalize(getTaskBaseName() + "CompileClasspath");
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:DefaultSourceSet.java

示例13: getStrutsForwardNameFromPath

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
/**
    * <p>
    * This helper method create the struts action forward name using the path. It will chop all path related
    * characters, such as "/" and ".do".
    * </p>
    *
    * <p>
    * For example:
    * <li><code>getStrutsForwardNameFromPath("/DisplayParallelActivity.do")<code>
    * = displayParallelActivity</li>
    * </p>
    *
    * @param path
    * @return
    */
   public static String getStrutsForwardNameFromPath(String path) {
String pathWithoutSlash = StringUtils.substringAfter(path, "/");
String orginalForwardName = StringUtils.substringBeforeLast(pathWithoutSlash, ".do");

return StringUtils.uncapitalize(orginalForwardName);

   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:23,代码来源:WebUtil.java


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