wt.util
Class CollationKeyFactory

java.lang.Object
  extended bywt.util.CollationKeyFactory
Direct Known Subclasses:
AbstractValueViewCollationKeyFactory, AdministrativeDomainNodeCollationKeyFactory, ClassnameCollationKeyFactory, DocumentStructureProcessor.SortCollationKeyFactory, DomainRefCollationKeyFactory, FolderCollationKeyFactory, FolderHierarchy.FolderHierarchyCollationKeyFactory, IdentityCollationKeyFactory, PrincipalCollationKeyFactory, QueryCollationKeyFactory, TeamTemplateCache.TeamTemplateIdentityCollationKeyFactory, TypeIdentifierCollationKeyFactory, WTProductConfigurationCollationKeyFactory

public class CollationKeyFactory
extends Object

A factory for object collation keys.

Supported API: true
Extendable: true


Field Summary
private  Collator collator
           
private  Locale locale
           
private static String versionID
           
 
Constructor Summary
CollationKeyFactory()
          Construct a collation key factory for the current WTContext's locale.
CollationKeyFactory(Locale locale)
          Construct a collation key factory for the given locale.
 
Method Summary
 String getCollationString(Object obj)
          Get a collation string for the given object.
 CollationKey getKey(Object obj)
          Get a collation key for the given object.
 Locale getLocale()
          Get the locale corresponding to this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionID

private static final String versionID
See Also:
Constant Field Values

locale

private Locale locale

collator

private Collator collator
Constructor Detail

CollationKeyFactory

public CollationKeyFactory()
Construct a collation key factory for the current WTContext's locale.

Supported API: true


CollationKeyFactory

public CollationKeyFactory(Locale locale)
Construct a collation key factory for the given locale.

Supported API: true

Parameters:
locale - desired locale
Method Detail

getLocale

public Locale getLocale()
Get the locale corresponding to this factory.

Supported API: true

Returns:
locale specified when factory was contstructed

getKey

public CollationKey getKey(Object obj)
Get a collation key for the given object.

Supported API: true

Parameters:
obj - the object
Returns:
collation key

getCollationString

public String getCollationString(Object obj)
Get a collation string for the given object. It is used as the source string for the collation key. This method returns obj.toString(). Subclasses should override to produce the desired collation string.

Supported API: true

Parameters:
obj - the object
Returns:
string collation key source string