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 Link icon

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

    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 Link icon

    • contains Link icon

      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 Link icon

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

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

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