本文整理汇总了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);
}
示例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);
}
示例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());
}
示例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());
}