atg.security
Class AccountComparator

java.lang.Object
  extended by atg.security.AccountComparator
All Implemented Interfaces:
java.util.Comparator

public abstract class AccountComparator
extends java.lang.Object
implements java.util.Comparator

Base class used for constructing sort comparators for account objects.


Field Summary
static java.util.Comparator BY_DESCRIPTION
          Sort comparator that will sort alphabetically by the account description.
static java.util.Comparator BY_FIRST_NAME
          Sort comparator that will sort alphabetically by the first name.
static java.util.Comparator BY_LAST_NAME
          Sort comparator that will sort alphabetically by the last name.
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
AccountComparator()
           
 
Method Summary
protected static int compareStrings(java.lang.String s1, java.lang.String s2)
          Compares two strings in a case-independent manner.
static boolean equals(java.lang.Object o1, java.lang.Object o2)
          Returns true if both account objects have equivalent login, first name, last name, and description.
protected static boolean equalStrings(java.lang.String s1, java.lang.String s2)
          Compares two strings for equivalence.
static java.lang.String getDescription(Account pAccount)
          Returns the description of the account, if applicable.
static java.lang.String getFirstName(Account pAccount)
          Returns the first name of the account owner, if applicable.
static java.lang.String getLastName(Account pAccount)
          Returns the last name of the account holder, if applicable.
 
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
compare, equals
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION

BY_DESCRIPTION

public static final java.util.Comparator BY_DESCRIPTION
Sort comparator that will sort alphabetically by the account description.


BY_FIRST_NAME

public static final java.util.Comparator BY_FIRST_NAME
Sort comparator that will sort alphabetically by the first name.


BY_LAST_NAME

public static final java.util.Comparator BY_LAST_NAME
Sort comparator that will sort alphabetically by the last name.

Constructor Detail

AccountComparator

public AccountComparator()
Method Detail

compareStrings

protected static int compareStrings(java.lang.String s1,
                                    java.lang.String s2)
Compares two strings in a case-independent manner.


equalStrings

protected static boolean equalStrings(java.lang.String s1,
                                      java.lang.String s2)
Compares two strings for equivalence.


getDescription

public static java.lang.String getDescription(Account pAccount)
Returns the description of the account, if applicable.


getFirstName

public static java.lang.String getFirstName(Account pAccount)
Returns the first name of the account owner, if applicable.


getLastName

public static java.lang.String getLastName(Account pAccount)
Returns the last name of the account holder, if applicable.


equals

public static boolean equals(java.lang.Object o1,
                             java.lang.Object o2)
Returns true if both account objects have equivalent login, first name, last name, and description.