站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

Children.SortedMap (Nodes API) - NetBeans API Javadoc (Current Development Version)

org.openide.nodes 7.0

org.openide.nodes
Class Children.SortedMap<T>

java.lang.Object
  extended by org.openide.nodes.Children
      extended by org.openide.nodes.Children.Map<T>
          extended by org.openide.nodes.Children.SortedMap<T>
Enclosing class:
Children

public static class Children.SortedMap<T>
extends Children.Map<T>

Maintains a list of children sorted by the provided comparator in a map. Similar to Children.SortedArray.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.openide.nodes.Children
Children.Array, Children.Keys<T>, Children.Map<T>, Children.SortedArray, Children.SortedMap<T>
 
Field Summary
 
Fields inherited from class org.openide.nodes.Children.Map
nodes
 
Fields inherited from class org.openide.nodes.Children
LEAF, MUTEX
 
Constructor Summary
  Children.SortedMap()
          Create an empty list.
protected Children.SortedMap(Map<T,Node> map)
          Create an empty list with a specific storage method.
 
Method Summary
 Comparator<? super Node> getComparator()
          Get the current comparator.
 void setComparator(Comparator<? super Node> c)
          Set the comparator.
 
Methods inherited from class org.openide.nodes.Children.Map
add, initMap, put, putAll, refresh, refreshKey, remove, remove, removeAll
 
Methods inherited from class org.openide.nodes.Children
addNotify, clone, findChild, getNode, getNodes, getNodes, getNodesCount, isInitialized, nodes, removeNotify
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Children.SortedMap

public Children.SortedMap()
Create an empty list.


Children.SortedMap

protected Children.SortedMap(Map<T,Node> map)
Create an empty list with a specific storage method.

Parameters:
map - the map to use with this object
See Also:
Children.Map.Children.Map(java.util.Map)
Method Detail

setComparator

public void setComparator(Comparator<? super Node> c)
Set the comparator. The children will be resorted. The comparator is used to compare Nodes, if no comparator is used then values will be compared by the use of natural ordering.

Parameters:
c - the new comparator that should compare nodes

getComparator

public Comparator<? super Node> getComparator()
Get the current comparator.

Returns:
the comparator

org.openide.nodes 7.0

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.