本文整理汇总了Java中com.sun.hotspot.igv.data.Pair类的典型用法代码示例。如果您正苦于以下问题:Java Pair类的具体用法?Java Pair怎么用?Java Pair使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Pair类属于com.sun.hotspot.igv.data包,在下文中一共展示了Pair类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: organize
import com.sun.hotspot.igv.data.Pair; //导入依赖的package包/类
public List<Pair<String, List<Group>>> organize(List<String> subFolders, List<Group> groups) {
List<Pair<String, List<Group>>> result = new ArrayList<Pair<String, List<Group>>>();
if (groups.size() == 1 && subFolders.size() > 0) {
result.add(new Pair<String, List<Group>>("", groups));
} else {
for (Group g : groups) {
List<Group> children = new ArrayList<Group>();
children.add(g);
Pair<String, List<Group>> p = new Pair<String, List<Group>>();
p.setLeft(g.getName());
p.setRight(children);
result.add(p);
}
}
return result;
}
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:20,代码来源:StandardGroupOrganizer.java
示例2: organize
import com.sun.hotspot.igv.data.Pair; //导入依赖的package包/类
public List<Pair<String, List<Group>>> organize(List<String> subFolders, List<Group> groups) {
List<Pair<String, List<Group>>> result = new ArrayList<Pair<String, List<Group>>>();
if (subFolders.size() == 0) {
buildResult(result, groups, packageNameProvider);
} else if (subFolders.size() == 1) {
buildResult(result, groups, classNameProvider);
} else if (subFolders.size() == 2) {
for (Group g : groups) {
List<Group> children = new ArrayList<Group>();
children.add(g);
Pair<String, List<Group>> p = new Pair<String, List<Group>>();
p.setLeft(reducedNameProvider.getName(g));
p.setRight(children);
result.add(p);
}
} else {
result.add(new Pair<String, List<Group>>("", groups));
}
return result;
}
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:24,代码来源:JavaGroupOrganizer.java
示例3: buildResult
import com.sun.hotspot.igv.data.Pair; //导入依赖的package包/类
private void buildResult(List<Pair<String, List<Group>>> result, List<Group> groups, NameProvider provider) {
HashMap<String, List<Group>> map = new HashMap<String, List<Group>>();
for (Group g : groups) {
String s = provider.getName(g);
if (!map.containsKey(s)) {
List<Group> list = new ArrayList<Group>();
Pair<String, List<Group>> pair = new Pair<String, List<Group>>(s, list);
result.add(pair);
map.put(s, list);
}
List<Group> curList = map.get(s);
curList.add(g);
}
Collections.sort(result, new Comparator<Pair<String, List<Group>>>() {
public int compare(Pair<String, List<Group>> a, Pair<String, List<Group>> b) {
return a.getLeft().compareTo(b.getLeft());
}
});
}
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:24,代码来源:JavaGroupOrganizer.java
示例4: changed
import com.sun.hotspot.igv.data.Pair; //导入依赖的package包/类
public void changed(Group source) {
List<Pair<String, List<Group>>> newStructure = new ArrayList<Pair<String, List<Group>>>();
for(Pair<String, List<Group>> p : parent.structure) {
refreshKey(p);
}
}
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:7,代码来源:FolderNode.java
示例5: organize
import com.sun.hotspot.igv.data.Pair; //导入依赖的package包/类
public List<Pair<String, List<Group>>> organize(List<String> subFolders, List<Group> groups);
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:2,代码来源:GroupOrganizer.java
注:本文中的com.sun.hotspot.igv.data.Pair类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论