org.apache.wicket.util.string.Strings.firstPathComponent()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(72)

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

Strings.firstPathComponent介绍

[英]Gets the first path component of a path using a given separator. If the separator cannot be found, the path itself is returned.

For example, firstPathComponent("foo.bar", '.') would return "foo" and firstPathComponent("foo", '.') would return "foo".
[中]获取使用给定分隔符的路径的第一个路径组件。如果找不到分隔符,则返回路径本身。
例如,firstPathComponent(“foo.bar”和“.”)将返回“foo”,firstPathComponent(“foo”和“.”)将返回“foo”。

代码示例

代码示例来源:origin: apache/wicket

String id = Strings.firstPathComponent(path, Component.PATH_SEPARATOR);
  id = Strings.firstPathComponent(path, Component.PATH_SEPARATOR);

代码示例来源:origin: org.apache.wicket/wicket-core

String id = Strings.firstPathComponent(path, Component.PATH_SEPARATOR);
  id = Strings.firstPathComponent(path, Component.PATH_SEPARATOR);

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

String id = Strings.firstPathComponent(path, Component.PATH_SEPARATOR);
  id = Strings.firstPathComponent(path, Component.PATH_SEPARATOR);

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

newEntry.requestCycle = RequestCycle.get();
pageMapsUsedInRequest.put(pageMap, newEntry);
final String id = Strings.firstPathComponent(componentPath,
  Component.PATH_SEPARATOR);
Page page = pageMap.get(Integer.parseInt(id), versionNumber);

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

newEntry.requestCycle = RequestCycle.get();
pageMapsUsedInRequest.put(pageMap, newEntry);
final String id = Strings.firstPathComponent(path, Component.PATH_SEPARATOR);
Page page = pageMap.get(Integer.parseInt(id), versionNumber);
if (page == null)

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

final String id = Strings.firstPathComponent(path, Component.PATH_SEPARATOR);

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/** {@inheritDoc} */
@Override
protected String addPageInfo(String url, PageInfo pageInfo)
{
  if (pageInfo == null)
  {
    return url;
  }
  else
  {
    // Insert the page info at the and of the path and before the querystring.
    if (url.indexOf('?') == -1)
    {
      return url + getBeginSeparator() + pageInfo.toString() + getEndSeparator();
    }
    else
    {
      return Strings.firstPathComponent(url, '?') + getBeginSeparator() +
        pageInfo.toString() + getEndSeparator() + '?' +
        Strings.afterFirstPathComponent(url, '?');
    }
  }
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

String lockedPageId = Strings.firstPathComponent(lockedRequest.getRequestParameters()
    .getComponentPath(), Component.PATH_SEPARATOR);
String currentPageId = Strings.firstPathComponent(currentRequestCycle.getRequest()
    .getRequestParameters().getComponentPath(), Component.PATH_SEPARATOR);

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

String lockedPageId = Strings.firstPathComponent(lockedRequest.getRequestParameters()
  .getComponentPath(), Component.PATH_SEPARATOR);
String currentPageId = Strings.firstPathComponent(currentRequestCycle.getRequest()
  .getRequestParameters()
  .getComponentPath(), Component.PATH_SEPARATOR);

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

.parseInt(Strings.firstPathComponent(requestParameters
    .getComponentPath(), Component.PATH_SEPARATOR));

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

final int pageId = Integer.parseInt(Strings.firstPathComponent(
  requestParameters.getComponentPath(), Component.PATH_SEPARATOR));

相关文章