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

RevisionList (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore.versioning
Class RevisionList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byjava.util.TreeSet
              extended byorg.netbeans.modules.vcscore.versioning.RevisionList
All Implemented Interfaces:
Cloneable, Collection, Node.Cookie, Serializable, Set, SortedSet

public class RevisionList
extends TreeSet
implements Node.Cookie

RevisionList is a sorted set of RevisionItem objects.

Can be overriden to provide different Node delegates createNodeDelegate(org.netbeans.modules.vcscore.versioning.RevisionItem, org.netbeans.modules.vcscore.versioning.RevisionChildren), or different children impl. getChildrenFor(org.netbeans.modules.vcscore.versioning.RevisionItem), or both.

See Also:
Serialized Form

Constructor Summary
RevisionList()
          Creates new RevisionList
 
Method Summary
 boolean add(Object obj)
           
 boolean addAll(Collection c)
           
 void addChangeListener(ChangeListener listener)
          Add a change listener to listen on changes of the content of this list.
 void clear()
           
 boolean containsSubRevisions(RevisionItem revision)
          Test whether this list contains any sub-revisions to the given revision.
protected  RevisionChildren createChildrenFor(RevisionItem item)
          Create the children implementation for the given revision item.
protected  Node createNodeDelegate(RevisionItem item, RevisionChildren children)
          Get the node delegate for RevisionItem.
 RevisionChildren getChildrenFor(RevisionItem item)
          Get the children implementation for the given revision item.
 FileObject getFileObject()
           
 Node getNodeDelegate(RevisionItem item, RevisionChildren children)
          Get the node delegate of the given revision item with given children.
 boolean remove(Object obj)
           
 boolean removeAll(Collection c)
           
 boolean removeChangeListener(ChangeListener listener)
           
 boolean removeRevision(String revision)
           
 void setFileObject(FileObject fo)
           
 
Methods inherited from class java.util.TreeSet
clone, comparator, contains, first, headSet, isEmpty, iterator, last, size, subSet, tailSet
 
Methods inherited from class java.util.AbstractSet
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
containsAll, equals, hashCode, retainAll, toArray, toArray
 

Constructor Detail

RevisionList

public RevisionList()
Creates new RevisionList

Method Detail

setFileObject

public final void setFileObject(FileObject fo)

getFileObject

public final FileObject getFileObject()

add

public boolean add(Object obj)
Specified by:
add in interface Set

addAll

public boolean addAll(Collection c)
Specified by:
addAll in interface Set

clear

public void clear()
Specified by:
clear in interface Set

remove

public boolean remove(Object obj)
Specified by:
remove in interface Set

removeAll

public boolean removeAll(Collection c)
Specified by:
removeAll in interface Set

removeRevision

public final boolean removeRevision(String revision)

addChangeListener

public final void addChangeListener(ChangeListener listener)
Add a change listener to listen on changes of the content of this list.


removeChangeListener

public final boolean removeChangeListener(ChangeListener listener)

containsSubRevisions

public final boolean containsSubRevisions(RevisionItem revision)
Test whether this list contains any sub-revisions to the given revision. This method is called to decide whether the given revision have any children or not. Uses RevisionItem.isDirectSubItemOf(org.netbeans.modules.vcscore.versioning.RevisionItem) method to decide whether there is some sub-revision or not.


getChildrenFor

public final RevisionChildren getChildrenFor(RevisionItem item)
Get the children implementation for the given revision item. createChildrenFor(org.netbeans.modules.vcscore.versioning.RevisionItem) method is called to create the children if necessary.

Parameters:
item - The revision item to get the children for or null when the root children are requested.

createChildrenFor

protected RevisionChildren createChildrenFor(RevisionItem item)
Create the children implementation for the given revision item. This method is called for revision items that are not branches and containsSubRevisions(org.netbeans.modules.vcscore.versioning.RevisionItem) returns true. The initial children should be returned when null argument is provided.

Called under a lock on this.

Parameters:
item - The revision item to get the children for or null when the root children are requested.

getNodeDelegate

public final Node getNodeDelegate(RevisionItem item,
                                  RevisionChildren children)
Get the node delegate of the given revision item with given children. The children are obtained by getChildrenFor(org.netbeans.modules.vcscore.versioning.RevisionItem) method. Uses createNodeDelegate(org.netbeans.modules.vcscore.versioning.RevisionItem, org.netbeans.modules.vcscore.versioning.RevisionChildren) method to create the node when it does not exist.


createNodeDelegate

protected Node createNodeDelegate(RevisionItem item,
                                  RevisionChildren children)
Get the node delegate for RevisionItem. Override to provide custom Node implementation.

Called under a lock on this.

Parameters:
item - The revision item
children - The children obtained from method.

 

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