All Packages Class Hierarchy This Package Previous Next Index
Class uhr.core.attract.MatchPolicy_FirstSubset
java.lang.Object
|
+----uhr.core.attract.MatchPolicy_FirstSubset
- public class MatchPolicy_FirstSubset
- extends Object
- implements MatchPolicy
This policy is the "FirstSubset" algorithm for matching.
It is stateless.
-
MatchPolicy_FirstSubset()
-
-
isMatch(ServiceNeed,
ServiceItem)
- Returns true if the item is a match for the need.
-
pickMatch(MatchChance)
- Returns the ServiceItem that is a satisfactory match for the
"chance session" or null if no match.
MatchPolicy_FirstSubset
public MatchPolicy_FirstSubset()
pickMatch
public ServiceItem pickMatch(MatchChance chance)
- Returns the ServiceItem that is a satisfactory match for the
"chance session" or null if no match. The chance argument is one
of a series of one or more chances in a chance session. A session
starts with
MatchChance.isFirstChance() == true and
ends with MatchChance.isLastChance() == true.
- Parameters:
- chance - the data representing this particular match chance.
- Returns:
- the ServcieItems that is a match or null for no match
at this time.
isMatch
public boolean isMatch(ServiceNeed need,
ServiceItem item)
- Returns true if the item is a match for the need. This is useful
for manual links to assert the link is a valid match, and other
future uses.
A "FirstSubset" match occurs if at least one need type is
an item type and if the need attributes are a subset of the
service attributes.
- Parameters:
- need - the ServiceNeed for the possible match.
- item - the ServiceItem for the possible match.
All Packages Class Hierarchy This Package Previous Next Index