com.atlassian.crowd.embedded.impl
Class IdentifierUtils

java.lang.Object
  extended by com.atlassian.crowd.embedded.impl.IdentifierUtils

public final class IdentifierUtils
extends java.lang.Object


Field Summary
static com.google.common.base.Function<java.lang.String,java.lang.String> TO_LOWER_CASE
          Function of toLowerCase(String) method.
 
Method Summary
static int compareToInLowerCase(java.lang.String identifier1, java.lang.String identifier2)
          Converts the two given identifier strings to lowercase and compare them.
static boolean equalsInLowerCase(java.lang.String identifier1, java.lang.String identifier2)
          Converts the two given identifier strings to lowercase and check for equality.
static void prepareIdentifierCompareLocale()
           
static java.lang.String toLowerCase(java.lang.String identifier)
          Converts the given identifier string to lowercase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TO_LOWER_CASE

public static final com.google.common.base.Function<java.lang.String,java.lang.String> TO_LOWER_CASE
Function of toLowerCase(String) method.

Method Detail

prepareIdentifierCompareLocale

public static void prepareIdentifierCompareLocale()

toLowerCase

public static java.lang.String toLowerCase(java.lang.String identifier)
Converts the given identifier string to lowercase. The rule of conversion is subject to the language defined in crowd.identifier.language system property.

Parameters:
identifier - the identifier string, not null.
Returns:
lowercase identifier.

compareToInLowerCase

public static int compareToInLowerCase(java.lang.String identifier1,
                                       java.lang.String identifier2)
Converts the two given identifier strings to lowercase and compare them. The rule of conversion is subject to the language defined in crowd.identifier.language system property.

Parameters:
identifier1 - identifier.
identifier2 - identifier.
Returns:
comparison result similar to as Comparator.compare(Object, Object)}

equalsInLowerCase

public static boolean equalsInLowerCase(java.lang.String identifier1,
                                        java.lang.String identifier2)
Converts the two given identifier strings to lowercase and check for equality. The rule of conversion is subject to the language defined in crowd.identifier.language system property.

Parameters:
identifier1 - identifier.
identifier2 - identifier.
Returns:
true if equal, otherwise false.


Copyright © 2012 Atlassian. All Rights Reserved.