Class SimpleMinimalRef
java.lang.Object
com.atlassian.bitbucket.repository.SimpleMinimalRef
- All Implemented Interfaces:
MinimalRef
- Direct Known Subclasses:
SimpleMinimalRepositoryRef
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
SimpleMinimalRef.AbstractMinimalRefBuilder<B extends SimpleMinimalRef.AbstractMinimalRefBuilder<B,
R>, R extends MinimalRef> static class
-
Constructor Summary
ModifierConstructorDescriptionprotected
SimpleMinimalRef
(SimpleMinimalRef.AbstractMinimalRefBuilder<?, ?> builder, RefType type) -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected String
Override this to add additional sub-class specific information totoString()
.An identifier for this reference suitable for display to end users.getId()
The absolute identifier of this reference, which should never be ambiguous within the backingRepository
.getType()
int
hashCode()
toString()
-
Constructor Details
-
SimpleMinimalRef
protected SimpleMinimalRef(@Nonnull SimpleMinimalRef.AbstractMinimalRefBuilder<?, ?> builder, @Nonnull RefType type)
-
-
Method Details
-
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 interfaceMinimalRef
- Returns:
- the reference's display identifier
-
getId
Description copied from interface:MinimalRef
The absolute identifier of this reference, which should never be ambiguous within the backingRepository
.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 interfaceMinimalRef
- Returns:
- the reference's absolute identifier
-
getType
- Specified by:
getType
in interfaceMinimalRef
- Returns:
- the type of ref
-
equals
-
hashCode
public int hashCode() -
toString
-
fieldsToString
Override this to add additional sub-class specific information totoString()
.- 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.
-