wt.folder
Class FolderCollationKeyFactory
java.lang.Object
wt.util.CollationKeyFactory
wt.folder.FolderCollationKeyFactory
- public final class FolderCollationKeyFactory
- extends CollationKeyFactory
A collation key factory for Foldered objects in a folder.
This class provides a collation string which can be used to order a set
of FolderEntry's, belonging to different folders, for display purposes.
Also see wt.util.SortedEnumeration, which can be used to perform sorting.
Supported API: true
Extendable: false
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FolderCollationKeyFactory
public FolderCollationKeyFactory()
- Construct a collation key factory for the current
WTContext
's locale.
Supported API: true
Extendable: false
FolderCollationKeyFactory
public FolderCollationKeyFactory(Locale locale)
- Construct a collation key factory for the given locale.
- Parameters:
locale
- desired locale
Supported API: true
Extendable: false
getCollationString
public String getCollationString(Object obj)
- Get a collation string for the given object. Prepends a 1 to the getName value
for folders and a 2 for foldered objects. This sorts the folders to the top of
the list. If it can't get a "getName" on the object then it will try to use
the identity.
- Overrides:
getCollationString
in class CollationKeyFactory
- Parameters:
obj
- the object that will be part of the sorted results
Supported API: true
Extendable: false
- Returns:
- string collation key source string