Class VersionRange

java.lang.Object
org.apache.felix.utils.version.VersionRange
All Implemented Interfaces:
Serializable

public class VersionRange extends Object implements Serializable
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • INFINITE_VERSION

      public static final org.osgi.framework.Version INFINITE_VERSION
    • ANY_VERSION

      public static final VersionRange ANY_VERSION
    • EXACT

      public static final int EXACT
      See Also:
    • MICRO

      public static final int MICRO
      See Also:
    • MINOR

      public static final int MINOR
      See Also:
    • MAJOR

      public static final int MAJOR
      See Also:
    • ANY

      public static final int ANY
      See Also:
    • openFloor

      private final boolean openFloor
    • floor

      private final org.osgi.framework.Version floor
    • ceiling

      private final org.osgi.framework.Version ceiling
    • openCeiling

      private final boolean openCeiling
    • removeable

      private static boolean[] removeable
  • Constructor Details

  • Method Details

    • removeQuotesAndWhitespaces

      private String removeQuotesAndWhitespaces(String val)
    • isRemoveable

      private boolean isRemoveable(char ch)
    • parseVersionRange

      public static VersionRange parseVersionRange(String val) throws IllegalArgumentException, NumberFormatException
      Throws:
      IllegalArgumentException
      NumberFormatException
    • getCeiling

      public org.osgi.framework.Version getCeiling()
    • getFloor

      public org.osgi.framework.Version getFloor()
    • isOpenCeiling

      public boolean isOpenCeiling()
    • isOpenFloor

      public boolean isOpenFloor()
    • isPointVersion

      public boolean isPointVersion()
    • contains

      public boolean contains(org.osgi.framework.Version version)
      test a version to see if it falls in the range
      Parameters:
      version - The version to check
      Returns:
      Whether the version is within the range
    • intersect

      public VersionRange intersect(VersionRange r)
    • isRangeValid

      private static boolean isRangeValid(boolean openFloor, org.osgi.framework.Version floor, org.osgi.framework.Version ceiling, boolean openCeiling)
      Check if the supplied parameters describe a valid version range.
      Parameters:
      openFloor - whether the minimum version is exclusive.
      floor - the minimum version.
      ceiling - the maximum version.
      openCeiling - whether the maximum version is exclusive.
      Returns:
      true is the range is valid; otherwise false.
    • checkRange

      private void checkRange()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • makeString

      private String makeString(boolean openFloor, org.osgi.framework.Version floor, org.osgi.framework.Version ceiling, boolean openCeiling)
    • newInstance

      public static VersionRange newInstance(org.osgi.framework.Version pointVersion, int lowerBoundRule, int upperBoundRule)