Record Class TemplateID
java.lang.Object
java.lang.Record
aQute.bnd.wstemplates.TemplateID
- All Implemented Interfaces:
Comparable<TemplateID>
public record TemplateID(String organisation, String repository, String path, String ref, String other)
extends Record
implements Comparable<TemplateID>
The ID of a template. This is either an org/repo/path#ref pattern or a uri to
a zip file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.static TemplateIDParse the id into a Template ID.final inthashCode()Returns a hash code value for this object.Returns the value of theorganisationrecord component.other()Returns the value of theotherrecord component.path()Returns the value of thepathrecord component.ref()Returns the value of therefrecord component.Returns the value of therepositoryrecord component.repoUrl()final StringtoString()Returns a string representation of this record class.uri()Return the URI.
-
Constructor Details
-
TemplateID
Creates an instance of aTemplateIDrecord class.- Parameters:
organisation- the value for theorganisationrecord componentrepository- the value for therepositoryrecord componentpath- the value for thepathrecord componentref- the value for therefrecord componentother- the value for theotherrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<TemplateID>
-
uri
Return the URI. -
repoUrl
- Returns:
- the url to the github repo source (without .zip extension)
-
from
Parse the id into a Template ID. The default is `bndtools/bndtools.workspace.min#master`. The missing fields are taken from this default. If the id does not match the pattern, it is assumed to be a URI.- Parameters:
id- id or uri- Returns:
- a TemplateId
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
organisation
Returns the value of theorganisationrecord component.- Returns:
- the value of the
organisationrecord component
-
repository
Returns the value of therepositoryrecord component.- Returns:
- the value of the
repositoryrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
ref
Returns the value of therefrecord component.- Returns:
- the value of the
refrecord component
-
other
Returns the value of theotherrecord component.- Returns:
- the value of the
otherrecord component
-