Skip navigation links
oracle.ide.panels
Class Navigable.NavigableComparator
java.lang.Object
oracle.ide.panels.Navigable.NavigableComparator
- All Implemented Interfaces:
- java.util.Comparator
- Enclosing class:
- Navigable
-
public static class Navigable.NavigableComparator
- extends java.lang.Object
- implements java.util.Comparator
Comparator
implementation used for sorting child Navigable
instances by label. This Comparator
has a provision for optionally specifying one item that is to appear first in the sorting order, regardless of its sorting position lexicographically.
Field Summary |
protected static java.text.Collator |
COLLATOR
|
Method Summary |
int |
compare(java.lang.Object o1, java.lang.Object o2)
|
java.lang.String |
getFirstItemLabel()
Returns the label of the item that should appear first in the sorting order; returns null if all Navigable instances are sorted lexicographically. |
void |
setFirstItemLabel(java.lang.String firstItemLabel)
Sets the label of the item that is to appear first in the sorting order; if null , then all Navigable instances are sorted lexicographically. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
COLLATOR
protected static final java.text.Collator COLLATOR
Navigable.NavigableComparator
public Navigable.NavigableComparator()
- Constructs a default
NavigableComparator
.
Navigable.NavigableComparator
public Navigable.NavigableComparator(java.lang.String firstItemLabel)
- Constructs a
NavigableComparator
using the specified label for the Navigable
that is to appear first in the sorting order.
setFirstItemLabel
public void setFirstItemLabel(java.lang.String firstItemLabel)
- Sets the label of the item that is to appear first in the sorting order; if
null
, then all Navigable
instances are sorted lexicographically.
getFirstItemLabel
public java.lang.String getFirstItemLabel()
- Returns the label of the item that should appear first in the sorting order; returns
null
if all Navigable
instances are sorted lexicographically.
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
-
- Specified by:
compare
in interface java.util.Comparator
Skip navigation links
Copyright © 1997, 2015, Oracle. All rights reserved.