org.osgl.util.Keyword.dashed()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.osgl.util.Keyword.dashed()方法的一些代码示例,展示了Keyword.dashed()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Keyword.dashed()方法的具体详情如下:
包路径:org.osgl.util.Keyword
类名称:Keyword
方法名:dashed

Keyword.dashed介绍

[英]Returns hyphen separated string.
[中]返回以连字符分隔的字符串。

代码示例

代码示例来源:origin: osglworks/java-tool

/**
 * Alias of {@link #dashed()}
 */
public String hyphenated() {
  return dashed();
}

代码示例来源:origin: actframework/actframework

@Override
public String id() {
  return null == name ? keyword.dashed() : name;
}

代码示例来源:origin: org.osgl/osgl-tool

/**
 * Alias of {@link #dashed()}
 */
public String hyphenated() {
  return dashed();
}

代码示例来源:origin: org.actframework/act

@Override
public String id() {
  return null == name ? keyword.dashed() : name;
}

代码示例来源:origin: org.osgl/osgl-tool

/**
 * Alias of {@link #dashed()}
 */
public String kebabCase() {
  return dashed();
}

代码示例来源:origin: org.actframework/act-morphia

@Override
public Object encode(Object value, MappedField optionalExtraInfo) {
  if (null == value) {
    return null;
  }
  return ((Keyword) value).dashed();
}

代码示例来源:origin: osglworks/java-tool

/**
 * Alias of {@link #dashed()}
 */
public String kebabCase() {
  return dashed();
}

代码示例来源:origin: org.osgl/osgl-tool

public static String dashed(CharSequence s) {
  return Keyword.of(s).dashed();
}

代码示例来源:origin: osglworks/java-tool

public static String dashed(CharSequence s) {
  return Keyword.of(s).dashed();
}

代码示例来源:origin: actframework/actframework

private void parseLeads(String[] specs) {
  lead1 = specs[0];
  if (specs.length > 1) {
    lead2 = specs[1];
  } else {
    String[] sa = lead1.split("[,;\\s]+");
    if (sa.length > 2) {
      throw E.unexpected("Option cannot have more than two leads");
    }
    if (sa.length > 1) {
      lead1 = sa[0];
      lead2 = sa[1];
    }
  }
  if (S.blank(lead1)) {
    lead1 = "-" + bindName.charAt(0);
    lead2 = "--" + Keyword.of(bindName).dashed();
  }
}

代码示例来源:origin: org.actframework/act

private void parseLeads(String[] specs) {
  lead1 = specs[0];
  if (specs.length > 1) {
    lead2 = specs[1];
  } else {
    String[] sa = lead1.split("[,;\\s]+");
    if (sa.length > 2) {
      throw E.unexpected("Option cannot have more than two leads");
    }
    if (sa.length > 1) {
      lead1 = sa[0];
      lead2 = sa[1];
    }
  }
  if (S.blank(lead1)) {
    lead1 = "-" + bindName.charAt(0);
    lead2 = "--" + Keyword.of(bindName).dashed();
  }
}

相关文章