Class CredentialsNameComparator
java.lang.Object
com.cloudbees.plugins.credentials.CredentialsNameComparator
- All Implemented Interfaces:
Serializable,Comparator<Credentials>
public class CredentialsNameComparator
extends Object
implements Comparator<Credentials>, Serializable
Comparator to alphabetically sort credentials drop down list in ascending order by Credential Name.
- Since:
- 1.28
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance that case insensitively sorts names using the the web request locale (if invoked from a web request handling thread) or the default locale (if invoked outside of a web request thread.CredentialsNameComparator(Locale locale) Creates a new instance that case insensitively sorts names using the specified locale.CredentialsNameComparator(Locale locale, boolean ignoreCase) Creates a new instance that sorts names using the specified locale. -
Method Summary
Modifier and TypeMethodDescriptionintcompare(Credentials c1, Credentials c2) booleaninthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
CredentialsNameComparator
public CredentialsNameComparator()Creates a new instance that case insensitively sorts names using the the web request locale (if invoked from a web request handling thread) or the default locale (if invoked outside of a web request thread. -
CredentialsNameComparator
Creates a new instance that case insensitively sorts names using the specified locale.- Parameters:
locale- the locale to use ornullto use the web request locale (if invoked from a web request handling thread) or the default locale (if invoked outside of a web request thread.
-
CredentialsNameComparator
Creates a new instance that sorts names using the specified locale.- Parameters:
locale- the locale to use ornullto use the web request locale (if invoked from a web request handling thread) or the default locale (if invoked outside of a web request thread.ignoreCase- iftruethen the names will be compared ignoring case.
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<Credentials>
-
hashCode
public int hashCode() -
equals
- Specified by:
equalsin interfaceComparator<Credentials>- Overrides:
equalsin classObject
-
toString
-