|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ide.model.DefaultFilter.SortedComparator
oracle.ide.model.DefaultFilter.SortedFolderFirstComparator
Builtin Comparator
class for ordering the children of a container node, with container children ordered before non-container children. Each subgroup of children (container children or non-container children) is ordered in locale-sensitive collation order.
This class is an extension of the builtin TNode.SortedComparator
class that provides one additional template method for determining where container children are ordered relative to non-container children.
Field Summary |
Fields inherited from class oracle.ide.model.DefaultFilter.SortedComparator |
collator, SORT_ALPHA, SORT_BY_TYPE |
Constructor Summary | |
DefaultFilter.SortedFolderFirstComparator() Default constructor. |
|
protected |
DefaultFilter.SortedFolderFirstComparator(boolean checkAttributes) Constructor. |
Method Summary | |
protected int |
compareElements(Element e1, Element e2) Override of TNode.SortedComparator#compareElements(Element, Element) to call a different comparison routine when the Element objects are not either both Folder s or both not Folder s. |
protected int |
compareFolderToElement(Folder f, Element e) Deprecated. no longer used; equivalent to compareUnlikeElementToElement(Element,Element) . |
protected int |
compareUnlikeElementToElement(Element f, Element e) Template method for comparing two unlike Element objects to each other. |
boolean |
equals(java.lang.Object obj) Implementation of the Comparator.equals(Object) method. |
protected boolean |
isFolder(Element e) Check if the element is a folder. |
Methods inherited from class oracle.ide.model.DefaultFilter.SortedComparator |
compare, compareElementToElement, compareStrings, compareTNodes, getOptions, setOptions |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultFilter.SortedFolderFirstComparator()
protected DefaultFilter.SortedFolderFirstComparator(boolean checkAttributes)
checkAttributes
- flag indicating that when sorting folders we need to check the folder attributes in order to determine if the folder is not hiding its children. This can happen when that folder is displayed in the application navigator.Method Detail |
public boolean equals(java.lang.Object obj)
Comparator.equals(Object)
method. Subclasses may need to override this method.
This implementation returns true
if this Comparator
has the same class and property as the other Object
.
equals
in interface java.util.Comparator
equals
in class DefaultFilter.SortedComparator
protected int compareElements(Element e1, Element e2)
TNode.SortedComparator#compareElements(Element, Element)
to call a different comparison routine when the Element
objects are not either both Folder
s or both not Folder
s.
Most subclasses should not need to override this method.
compareElements
in class DefaultFilter.SortedComparator
protected int compareUnlikeElementToElement(Element f, Element e)
Element
objects to each other. One Element
object is not like another if only one of them is a container.
Subclasses may wish to override this method. The default implementation always returns -1
, which causes container elements to be ordered before non-container elements.
f
- an Element
that may contain childrene
- an Element
that may not contain childrenprotected int compareFolderToElement(Folder f, Element e)
compareUnlikeElementToElement(Element,Element)
.protected boolean isFolder(Element e)
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.