Package jenkins.model
Class IdStrategy.CaseSensitive
java.lang.Object
jenkins.model.IdStrategy
jenkins.model.IdStrategy.CaseSensitive
- All Implemented Interfaces:
ExtensionPoint,Describable<IdStrategy>,Serializable,Comparator<String>
- Direct Known Subclasses:
IdStrategy.CaseSensitiveEmailAddress
- Enclosing class:
IdStrategy
A case sensitive
IdStrategy- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class jenkins.model.IdStrategy
IdStrategy.CaseInsensitive, IdStrategy.CaseSensitive, IdStrategy.CaseSensitiveEmailAddressNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class jenkins.model.IdStrategy
CASE_INSENSITIVE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompare two IDs and return their sorting order.booleanCompare two IDs and returntrueIFF the two ids are the same.idFromFilename(String filename) Converts a filename into the corresponding id.Methods inherited from class jenkins.model.IdStrategy
all, equals, filenameOf, getDescriptor, hashCode, keyFor, legacyFilenameOf, toStringMethods 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
-
CaseSensitive
@DataBoundConstructor public CaseSensitive()
-
-
Method Details
-
idFromFilename
Description copied from class:IdStrategyConverts a filename into the corresponding id. This may contain filesystem unsafe characters.- Overrides:
idFromFilenamein classIdStrategy- Parameters:
filename- the filename.- Returns:
- the corresponding id.
-
equals
Description copied from class:IdStrategyCompare two IDs and returntrueIFF the two ids are the same. Normally we expect that this should be the same asIdStrategy.compare(String, String)being equal to0, however there may be a specific reason for going beyond that, such as sorting id's case insensitively while treating them as case sensitive. Subclasses may want to override this naïve implementation that callscompare(id1, id2) == 0for a more performant implementation.- Overrides:
equalsin classIdStrategy- Parameters:
id1- the first id.id2- the second id.- Returns:
trueif and only if the two ids are the same.
-
compare
Description copied from class:IdStrategyCompare two IDs and return their sorting order. IfIdStrategy.equals(String, String)istruethen this must return0butIdStrategy.compare(String, String)returning0need not imply thatIdStrategy.equals(String, String)istrue.- Specified by:
comparein interfaceComparator<String>- Specified by:
comparein classIdStrategy- Parameters:
id1- the first id.id2- the second id.- Returns:
- the sorting order of the two IDs.
-