Class Restriction


  • public class Restriction
    extends Object
    Describes a restriction in versioning.
    Author:
    Brett Porter
    • Field Detail

      • EVERYTHING

        public static final Restriction EVERYTHING
        The Constant EVERYTHING.
      • NONE

        public static final Restriction NONE
        The Constant NONE.
    • Constructor Detail

      • Restriction

        public Restriction​(ArtifactVersion lowerBound,
                           boolean lowerBoundInclusive,
                           ArtifactVersion upperBound,
                           boolean upperBoundInclusive)
        Instantiates a new restriction.
        Parameters:
        lowerBound - the lower bound
        lowerBoundInclusive - the lower bound inclusive
        upperBound - the upper bound
        upperBoundInclusive - the upper bound inclusive
    • Method Detail

      • getLowerBound

        public ArtifactVersion getLowerBound()
        Gets the lower bound.
        Returns:
        the lower bound
      • isLowerBoundInclusive

        public boolean isLowerBoundInclusive()
        Checks if is lower bound inclusive.
        Returns:
        true, if is lower bound inclusive
      • getUpperBound

        public ArtifactVersion getUpperBound()
        Gets the upper bound.
        Returns:
        the upper bound
      • isUpperBoundInclusive

        public boolean isUpperBoundInclusive()
        Checks if is upper bound inclusive.
        Returns:
        true, if is upper bound inclusive
      • containsVersion

        public boolean containsVersion​(ArtifactVersion version)
        Contains version.
        Parameters:
        version - the version
        Returns:
        true, if successful
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object