Class IdCredentials.Helpers

java.lang.Object
com.cloudbees.plugins.credentials.common.IdCredentials.Helpers
Enclosing interface:
IdCredentials

public static final class IdCredentials.Helpers extends Object
The contract implementations of Object.equals(Object) and Object.hashCode() that implementations of this class must use as the basis for equality tests and as the hash code.
Since:
1.6
  • Constructor Details

    • Helpers

      public Helpers()
  • Method Details

    • equals

      public static boolean equals(IdCredentials self, Object o)
      Standard Object.equals(Object) implementation.
      Parameters:
      self - the this reference.
      o - the other object.
      Returns:
      true if equal.
    • hashCode

      public static int hashCode(IdCredentials self)
      The standard Object.hashCode() implementation.
      Parameters:
      self - the this reference.
      Returns:
      the hash code.
    • fixEmptyId

      @NonNull public static String fixEmptyId(@CheckForNull String id)
      Returns either the id or a generated new id if the supplied id is missing.
      Parameters:
      id - the supplied id.
      Returns:
      either the id or a generated new id if the supplied id is missing.