Record Class SemanticVersion.BuildIdentifier
java.lang.Object
java.lang.Record
xyz.apollosoftware.bibliothiki.versioning.schemes.semver.SemanticVersion.BuildIdentifier
- Record Components:
value- The build identifier string value.
- Enclosing class:
SemanticVersion
A build metadata identifier.
Identifiers are simply retained as a raw string but must only contain alphanumeric characters and hyphens.
Per the Semantic Versioning (SemVer) specification, build metadata identifiers must not be empty.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull SemanticVersion.BuildIdentifierbuildMetadata(String value) A static sugar forBuildIdentifier(String).final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NonNull StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
BuildIdentifier
Construct the build metadata identifier.Build identifiers must not be empty so this constructor enforces that by ensuring the given value is non-empty.
This constructor also enforces the character set requirements for the build identifier.
- Parameters:
value- The build metadata value.
-
-
Method Details
-
buildMetadata
A static sugar forBuildIdentifier(String).- Parameters:
value- The build identifier value.- Returns:
- The created build identifier.
-
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). -
value
-