Package jenkins.model

Class IdStrategy.CaseSensitive

All Implemented Interfaces:
ExtensionPoint, Describable<IdStrategy>, Serializable, Comparator<String>
Direct Known Subclasses:
IdStrategy.CaseSensitiveEmailAddress
Enclosing class:
IdStrategy

public static class IdStrategy.CaseSensitive extends IdStrategy implements Serializable
A case sensitive IdStrategy
See Also:
  • Constructor Details

    • CaseSensitive

      @DataBoundConstructor public CaseSensitive()
  • Method Details

    • idFromFilename

      public String idFromFilename(@NonNull String filename)
      Description copied from class: IdStrategy
      Converts a filename into the corresponding id. This may contain filesystem unsafe characters.
      Overrides:
      idFromFilename in class IdStrategy
      Parameters:
      filename - the filename.
      Returns:
      the corresponding id.
    • equals

      public boolean equals(@NonNull String id1, @NonNull String id2)
      Description copied from class: IdStrategy
      Compare two IDs and return true IFF the two ids are the same. Normally we expect that this should be the same as IdStrategy.compare(String, String) being equal to 0, 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 calls compare(id1, id2) == 0 for a more performant implementation.
      Overrides:
      equals in class IdStrategy
      Parameters:
      id1 - the first id.
      id2 - the second id.
      Returns:
      true if and only if the two ids are the same.
    • compare

      public int compare(@NonNull String id1, @NonNull String id2)
      Description copied from class: IdStrategy
      Compare two IDs and return their sorting order. If IdStrategy.equals(String, String) is true then this must return 0 but IdStrategy.compare(String, String) returning 0 need not imply that IdStrategy.equals(String, String) is true.
      Specified by:
      compare in interface Comparator<String>
      Specified by:
      compare in class IdStrategy
      Parameters:
      id1 - the first id.
      id2 - the second id.
      Returns:
      the sorting order of the two IDs.