Package org.eclipse.equinox.p2.metadata
Interface IRequirement
-
public interface IRequirementA requirement represents some external constraint on anIInstallableUnit. Each requirement represents something anIInstallableUnitneeds that it expects to be provided by anotherIInstallableUnit. Requirements are entirely generic, and are intended to be capable of representing anything that anIInstallableUnitmay need either at install time, or at runtime.Instances of this class are handle objects and do not necessarily reflect entities that exist in any particular profile or repository. These handle objects can be created using
MetadataFactory.- Since:
- 2.0
- See Also:
IProvidedCapability,MetadataFactory.createRequirement(String, String, VersionRange, String, boolean, boolean, boolean)- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetDescription()Returns a textual description of this requirement.IMatchExpression<IInstallableUnit>getFilter()IMatchExpression<IInstallableUnit>getMatches()Returns a boolean match expression that will return true for anyIInstallableUnitthat matches the requirement.intgetMax()Returns the maximum cardinality of the requirement.intgetMin()Returns the minimum cardinality of the requirement.booleanisGreedy()Returns whether this requirement should cause extra installable units to be installed in order to satisfy it.booleanisMatch(IInstallableUnit iu)Returns whether the provided capabilities of the given installable unit satisfy this requirement.
-
-
-
Method Detail
-
getMin
int getMin()
Returns the minimum cardinality of the requirement. That is, the minimum number of capabilities that must be provided that match this requirement before this requirement is considered fully satisfied. A minimum cardinality of 0 indicates that the requirement is optional.- Returns:
- the minimum cardinality of this requirement
-
getMax
int getMax()
Returns the maximum cardinality of the requirement. That is, the maximum number of capabilities that are permitted to be present that satisfy this requirement. A maximum cardinality of 0 indicates that there must not be any installable unit in the system that satisfies this requirement.- Returns:
- the maximum cardinality of this requirement
-
getFilter
IMatchExpression<IInstallableUnit> getFilter()
- Since:
- 2.0
- Restriction:
- This method is not intended to be referenced by clients.
-
getMatches
IMatchExpression<IInstallableUnit> getMatches()
Returns a boolean match expression that will return true for anyIInstallableUnitthat matches the requirement.- Returns:
- A boolean match expression for installable unit matching.
-
isMatch
boolean isMatch(IInstallableUnit iu)
Returns whether the provided capabilities of the given installable unit satisfy this requirement.- Parameters:
iu- the installable unit to check for matching capabilities- Returns:
trueif the given installable unit satisfies this requirement, andfalseotherwise.
-
isGreedy
boolean isGreedy()
Returns whether this requirement should cause extra installable units to be installed in order to satisfy it.- Returns:
trueif additional installable units should be installed to satisfy this requirement, andfalseotherwise
-
getDescription
String getDescription()
Returns a textual description of this requirement.- Returns:
- a textual description of this requirement
-
-