当前位置: 首页>>代码示例>>Java>>正文


Java CollectionUtils.unmodifiableCollection方法代码示例

本文整理汇总了Java中org.apache.commons.collections15.CollectionUtils.unmodifiableCollection方法的典型用法代码示例。如果您正苦于以下问题:Java CollectionUtils.unmodifiableCollection方法的具体用法?Java CollectionUtils.unmodifiableCollection怎么用?Java CollectionUtils.unmodifiableCollection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.collections15.CollectionUtils的用法示例。


在下文中一共展示了CollectionUtils.unmodifiableCollection方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getChildEdges

import org.apache.commons.collections15.CollectionUtils; //导入方法依赖的package包/类
/**
 * @see edu.uci.ics.jung.graph.Tree#getChildEdges(java.lang.Object)
 */
public Collection<E> getChildEdges(V vertex) 
{
    if (!containsVertex(vertex)) 
    	return null;
    List<E> edges = vertex_data.get(vertex).child_edges;
    return edges == null ? Collections.<E>emptySet() : 
        CollectionUtils.unmodifiableCollection(edges);
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:12,代码来源:OrderedKAryTree.java

示例2: getChildren

import org.apache.commons.collections15.CollectionUtils; //导入方法依赖的package包/类
/**
 * Returns an ordered list of {@code vertex}'s child vertices.
 * If there is no child in position i, then the list will contain
 * {@code null} in position i.  If {@code vertex} has no children
 * then the empty set will be returned.
 * @see edu.uci.ics.jung.graph.Tree#getChildren(java.lang.Object)
 */
public Collection<V> getChildren(V vertex) 
{
    if (!containsVertex(vertex)) 
        return null;
    List<E> edges = vertex_data.get(vertex).child_edges;
    if (edges == null)
    	return Collections.emptySet();
    Collection<V> children = new ArrayList<V>(order);
    for (E edge : edges)
        children.add(this.getOpposite(vertex, edge));
    return CollectionUtils.unmodifiableCollection(children);
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:20,代码来源:OrderedKAryTree.java

示例3: getEdges

import org.apache.commons.collections15.CollectionUtils; //导入方法依赖的package包/类
/**
 * @see edu.uci.ics.jung.graph.Hypergraph#getEdges()
 */
public Collection<E> getEdges() 
{
	return CollectionUtils.unmodifiableCollection(edge_vpairs.keySet());
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:8,代码来源:OrderedKAryTree.java

示例4: getVertices

import org.apache.commons.collections15.CollectionUtils; //导入方法依赖的package包/类
/**
 * @see edu.uci.ics.jung.graph.Hypergraph#getVertices()
 */
public Collection<V> getVertices() 
{
  return CollectionUtils.unmodifiableCollection(vertex_data.keySet());
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:8,代码来源:OrderedKAryTree.java


注:本文中的org.apache.commons.collections15.CollectionUtils.unmodifiableCollection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。