Interface VersionRange


@Experimental public interface VersionRange
A range of versions. VersionConstraint objects are created using the VersionParser service.
Since:
4.0.0
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Represents range boundary.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a string representation of this version range
    boolean
    contains(Version version)
    Determines whether the specified version is contained within this range.
    Returns the lower boundary of this range, or null if none.
    Returns the upper boundary of this range, or null if none.
  • Method Details

    • contains

      boolean contains(@Nonnull Version version)
      Determines whether the specified version is contained within this range.
      Parameters:
      version - the version to test, must not be null
      Returns:
      true if this range contains the specified version, false otherwise
    • getUpperBoundary

      @Nullable VersionRange.Boundary getUpperBoundary()
      Returns the upper boundary of this range, or null if none.
    • getLowerBoundary

      @Nullable VersionRange.Boundary getLowerBoundary()
      Returns the lower boundary of this range, or null if none.
    • asString

      @Nonnull String asString()
      Returns a string representation of this version range
      Returns:
      the string representation of this version range