Package wt.folder
Class FolderCollationKeyFactory
java.lang.Object
wt.util.CollationKeyFactory
wt.folder.FolderCollationKeyFactory
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
Supported API: true
Extendable: false
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a collation key factory for the currentWTContext's locale.FolderCollationKeyFactory(Locale locale) Construct a collation key factory for the given locale. -
Method Summary
Modifier and TypeMethodDescriptiongetCollationString(Object obj) Get a collation string for the given object.Methods inherited from class wt.util.CollationKeyFactory
getKey, getLocale
-
Constructor Details
-
FolderCollationKeyFactory
public FolderCollationKeyFactory()Construct a collation key factory for the currentWTContext's locale.
Supported API: true
Extendable: false -
FolderCollationKeyFactory
Construct a collation key factory for the given locale.- Parameters:
locale- desired locale
Supported API: true
Extendable: false
-
-
Method Details
-
getCollationString
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:
getCollationStringin classCollationKeyFactory- Parameters:
obj- the object that will be part of the sorted results
Supported API: true
Extendable: false- Returns:
- string collation key source string
-