Class ExactVersionConstraint
java.lang.Object
one.pkg.tinyutils.minecraft.version.constraint.ExactVersionConstraint
- All Implemented Interfaces:
VersionConstraint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the lowest version that satisfies the version constraint.Retrieves the highest version defined by the version constraint.Retrieves a list of version constraints represented as strings.original()Retrieves the original constraint string as it was input or defined.booleanDetermines if the given version satisfies the constraints defined by this implementation.
-
Constructor Details
-
ExactVersionConstraint
-
-
Method Details
-
satisfies
Description copied from interface:VersionConstraintDetermines if the given version satisfies the constraints defined by this implementation.- Specified by:
satisfiesin interfaceVersionConstraint- Parameters:
version- the version to be checked against the constraints- Returns:
- true if the version satisfies the constraints, false otherwise
-
original
Description copied from interface:VersionConstraintRetrieves the original constraint string as it was input or defined.- Specified by:
originalin interfaceVersionConstraint- Returns:
- the original version constraint string that was used to create this constraint.
-
getVersions
Description copied from interface:VersionConstraintRetrieves a list of version constraints represented as strings.This method aggregates all conditions that define valid versions and returns them in a standardized string format for further interpretation or display.
- Specified by:
getVersionsin interfaceVersionConstraint- Returns:
- a list of strings where each string specifies a version constraint.
-
getLowVersion
Description copied from interface:VersionConstraintRetrieves the lowest version that satisfies the version constraint.The result depends on how the specific implementation computes the lowest version. It may return null if the constraint defines no minimum version.
- Specified by:
getLowVersionin interfaceVersionConstraint- Returns:
- the lowest version as a string
-
getMaxVersion
Description copied from interface:VersionConstraintRetrieves the highest version defined by the version constraint.Depending on the implementing class, this may involve calculating the maximum version based on one or more underlying version constraints.
- Specified by:
getMaxVersionin interfaceVersionConstraint- Returns:
- the maximum version as a string
-