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

Children.SortedArray (NetBeans APIs) - NetBeans API Javadoc 4.1.0


org.openide.nodes
Class Children.SortedArray

java.lang.Object
  extended byorg.openide.nodes.Children
      extended byorg.openide.nodes.Children.Array
          extended byorg.openide.nodes.Children.SortedArray
All Implemented Interfaces:
Cloneable
Enclosing class:
Children

public static class Children.SortedArray
extends Children.Array

Maintains a list of children sorted by the provided comparator in an array. The comparator can change during the lifetime of the children, in which case the children are resorted.


Nested Class Summary
 
Nested classes inherited from class org.openide.nodes.Children
Children.Array, Children.Keys, Children.Map, Children.SortedArray, Children.SortedMap
 
Field Summary
 
Fields inherited from class org.openide.nodes.Children.Array
nodes
 
Fields inherited from class org.openide.nodes.Children
LEAF, MUTEX
 
Constructor Summary
  Children.SortedArray()
          Create an empty list of children.
protected Children.SortedArray(Collection c)
          Create an empty list with a specified storage method.
 
Method Summary
 Comparator getComparator()
          Get the current comparator.
 void setComparator(Comparator c)
          Set the comparator.
 
Methods inherited from class org.openide.nodes.Children.Array
add, clone, initCollection, refresh, remove
 
Methods inherited from class org.openide.nodes.Children
addNotify, 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.SortedArray

public Children.SortedArray()
Create an empty list of children.


Children.SortedArray

protected Children.SortedArray(Collection c)
Create an empty list with a specified storage method.

Parameters:
c - collection to store data in
See Also:
Children.Array.Children.Array(Collection)
Method Detail

setComparator

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

Parameters:
c - the new comparator

getComparator

public Comparator getComparator()
Get the current comparator.

Returns:
the comparator


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