hudson.Util.createSubList()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(196)

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

Util.createSubList介绍

[英]Create a sub-list by only picking up instances of the specified type.
[中]通过仅拾取指定类型的实例来创建子列表。

代码示例

代码示例来源:origin: jenkinsci/jenkins

  1. /**
  2. * Gets a list of simple top-level projects.
  3. * @deprecated This method will ignore Maven and matrix projects, as well as projects inside containers such as folders.
  4. * You may prefer to call {@link #getAllItems(Class)} on {@link AbstractProject},
  5. * perhaps also using {@link Util#createSubList} to consider only {@link TopLevelItem}s.
  6. * (That will also consider the caller's permissions.)
  7. * If you really want to get just {@link Project}s at top level, ignoring permissions,
  8. * you can filter the values from {@link #getItemMap} using {@link Util#createSubList}.
  9. */
  10. @Deprecated
  11. public List<Project> getProjects() {
  12. return Util.createSubList(items.values(), Project.class);
  13. }

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

  1. /**
  2. * Gets the list of all the projects.
  3. *
  4. * <p>
  5. * Since {@link Project} can only show up under {@link Hudson},
  6. * no need to search recursively.
  7. */
  8. public List<Project> getProjects() {
  9. return Util.createSubList(items.values(), Project.class);
  10. }

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

  1. /**
  2. * Gets the list of all the projects.
  3. *
  4. * <p>
  5. * Since {@link Project} can only show up under {@link Hudson},
  6. * no need to search recursively.
  7. */
  8. public List<Project> getProjects() {
  9. return Util.createSubList(items.values(), Project.class);
  10. }

代码示例来源:origin: hudson/hudson-2.x

  1. /**
  2. * Gets the list of all the projects.
  3. *
  4. * <p>
  5. * Since {@link Project} can only show up under {@link Hudson},
  6. * no need to search recursively.
  7. */
  8. public List<Project> getProjects() {
  9. return Util.createSubList(items.values(), Project.class);
  10. }

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

  1. /**
  2. * Gets a list of simple top-level projects.
  3. * @deprecated This method will ignore Maven and matrix projects, as well as projects inside containers such as folders.
  4. * You may prefer to call {@link #getAllItems(Class)} on {@link AbstractProject},
  5. * perhaps also using {@link Util#createSubList} to consider only {@link TopLevelItem}s.
  6. * (That will also consider the caller's permissions.)
  7. * If you really want to get just {@link Project}s at top level, ignoring permissions,
  8. * you can filter the values from {@link #getItemMap} using {@link Util#createSubList}.
  9. */
  10. @Deprecated
  11. public List<Project> getProjects() {
  12. return Util.createSubList(items.values(), Project.class);
  13. }

相关文章