Class SimpleMinimalRef

java.lang.Object
com.atlassian.bitbucket.repository.SimpleMinimalRef
All Implemented Interfaces:
MinimalRef
Direct Known Subclasses:
SimpleMinimalRepositoryRef

public class SimpleMinimalRef extends Object implements MinimalRef
  • Constructor Details

  • Method Details

    • getDisplayId

      @Nonnull public String getDisplayId()
      Description copied from interface: MinimalRef
      An identifier for this reference suitable for display to end users.

      No guarantees are made as to how this identifier differs from MinimalRef.getId()--they may be identical or not, at the whim of the underlying SCM implementation. In practise, however, the returned identifier should be sensible for users familiar with the underlying SCM.

      Specified by:
      getDisplayId in interface MinimalRef
      Returns:
      the reference's display identifier
    • getId

      @Nonnull public String getId()
      Description copied from interface: MinimalRef
      The absolute identifier of this reference, which should never be ambiguous within the backing Repository.

      When performing operations which accept a commit ID, this is the value that should be used to ensure there are no ambiguities. Using MinimalRef.getDisplayId() may result in unexpected behaviour.

      Specified by:
      getId in interface MinimalRef
      Returns:
      the reference's absolute identifier
    • getType

      @Nonnull public RefType getType()
      Specified by:
      getType in interface MinimalRef
      Returns:
      the type of ref
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fieldsToString

      @Nonnull protected String fieldsToString()
      Override this to add additional sub-class specific information to toString().
      Returns:
      String that will be used in this object's toString(). The format is expected to be "field1=value1, field2=value2", the caller takes care of surrounding it with a class name and braces.