Package org.hotswap.agent.versions
Class Restriction
- java.lang.Object
-
- org.hotswap.agent.versions.Restriction
-
public class Restriction extends Object
Describes a restriction in versioning.- Author:
- Brett Porter
-
-
Field Summary
Fields Modifier and Type Field Description static RestrictionEVERYTHINGThe Constant EVERYTHING.static RestrictionNONEThe Constant NONE.
-
Constructor Summary
Constructors Constructor Description Restriction(ArtifactVersion lowerBound, boolean lowerBoundInclusive, ArtifactVersion upperBound, boolean upperBoundInclusive)Instantiates a new restriction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsVersion(ArtifactVersion version)Contains version.booleanequals(Object other)ArtifactVersiongetLowerBound()Gets the lower bound.ArtifactVersiongetUpperBound()Gets the upper bound.inthashCode()booleanisLowerBoundInclusive()Checks if is lower bound inclusive.booleanisUpperBoundInclusive()Checks if is upper bound inclusive.StringtoString()
-
-
-
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 boundlowerBoundInclusive- the lower bound inclusiveupperBound- the upper boundupperBoundInclusive- 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
-
-