當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。