java.lang.Object
java.lang.Record
io.github.nscuro.versatile.Vers
- Record Components:
scheme- The versioning scheme of this version rangeconstraints- TheConstraints composing this version range
A version range as defined in the vers specification.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionVers(String scheme, List<Constraint> constraints) Creates an instance of aVersrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Vers.BuilderReturns the value of theconstraintsrecord component.booleanfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.invert()Inverts a given vers expression and returns a new simplified versbooleanbooleanoverlapsWith(Vers vers) Checks if his vers has a potential version overlap with another versstatic Versstatic List<Constraint>scheme()Returns the value of theschemerecord component.simplify()split()toString()Returns a string representation of this record class.validate()
-
Constructor Details
-
Vers
Creates an instance of aVersrecord class.- Parameters:
scheme- the value for theschemerecord componentconstraints- the value for theconstraintsrecord component
-
-
Method Details
-
parse
-
split
-
builder
-
scheme
Returns the value of theschemerecord component.- Returns:
- the value of the
schemerecord component
-
constraints
Returns the value of theconstraintsrecord component.- Returns:
- the value of the
constraintsrecord component
-
isWildcard
public boolean isWildcard() -
contains
-
simplify
-
validate
-
overlapsWith
Checks if his vers has a potential version overlap with another vers- Parameters:
vers- the vers to check for overlap with- Returns:
- true if there is an overlap, false otherwise
- Throws:
VersException- if the compared verses have different schemes
-
invert
Inverts a given vers expression and returns a new simplified vers- Throws:
VersException- if the vers is a wildcard
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
removeUnboundedConstraints
-
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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).
-