public class SimpleMinimalRef extends Object implements MinimalRef
Modifier and Type | Class and Description |
---|---|
protected static class |
SimpleMinimalRef.AbstractMinimalRefBuilder<B extends SimpleMinimalRef.AbstractMinimalRefBuilder<B,R>,R extends MinimalRef> |
static class |
SimpleMinimalRef.Builder |
Modifier | Constructor and Description |
---|---|
protected |
SimpleMinimalRef(SimpleMinimalRef.AbstractMinimalRefBuilder<?,?> builder,
RefType type) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
protected String |
fieldsToString()
Override this to add additional sub-class specific information to
toString() . |
String |
getDisplayId()
An identifier for this reference suitable for display to end users.
|
String |
getId()
The absolute identifier of this reference, which should never be ambiguous within the backing
Repository . |
RefType |
getType() |
int |
hashCode() |
String |
toString() |
protected SimpleMinimalRef(@Nonnull SimpleMinimalRef.AbstractMinimalRefBuilder<?,?> builder, @Nonnull RefType type)
@Nonnull public String getDisplayId()
MinimalRef
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.
getDisplayId
in interface MinimalRef
@Nonnull public String getId()
MinimalRef
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.
getId
in interface MinimalRef
@Nonnull public RefType getType()
getType
in interface MinimalRef
@Nonnull protected String fieldsToString()
toString()
.toString()
. The format is expected to be
"field1=value1, field2=value2"
, the caller takes care of surrounding it with a class name and braces.Copyright © 2022 Atlassian. All rights reserved.