All Packages Class Hierarchy This Package Previous Next Index
Class uhr.core.attract.MatchChanceStd
java.lang.Object
|
+----uhr.core.attract.MatchChanceStd
- public class MatchChanceStd
- extends Object
- implements MatchChance
A MatchChance represents one chance to make a match. It holds
the data needed to make a match decision.
This data structure is designed to represent one or more chances
to make a match for a particular need. The first such chance will
have isFirstChance() return true. The last such chance
will have isLastChance() return true. This allows
the policy for matching to know where in a series of match
chances a chance is.
For example a policy trying for the highest rating on various
attributes may clear itself on the first chance, and keep the
ServiceItems meeting a minumum criteria on each chance. Then on
the last chance it may evaluate all items and pick the best
rating.
It is impossible to predict what various domains will need, so
the core exposes all that it knows that is relevant to
the policy for making a match decision. This allows the core to
remain small by being domain neutral, because the actual policy
is provided by parts, which can be in any domain.
-
MatchChanceStd()
-
-
getItems()
- Returns the ServiceItems involved in the match or null if none.
-
getNeed()
- Returns the need involved in the match.
-
isFirstChance()
- Determines whether this is the "first chance" or not.
-
isLastChance()
- Determines whether this is the "last chance" or not.
-
setFirstChance(boolean)
- Sets whether this is the "first chance" to make a match for this
need.
-
setItems(Enumeration)
- Sets the ServiceItems involved in the match.
-
setLastChance(boolean)
- Sets whether this is the "last chance" to make a match for this
need.
-
setNeed(ServiceNeed)
- Sets the need involved in the match.
MatchChanceStd
public MatchChanceStd()
setNeed
public void setNeed(ServiceNeed need)
- Sets the need involved in the match. This is required.
- Parameters:
- need - the need involved in the match.
getNeed
public ServiceNeed getNeed()
- Returns the need involved in the match.
- Returns:
- the need.
setItems
public void setItems(Enumeration items)
- Sets the ServiceItems involved in the match. The default is null.
- Parameters:
- items - the Enumeration of ServiceItems.
getItems
public Enumeration getItems()
- Returns the ServiceItems involved in the match or null if none.
- Returns:
- the Enumeration of ServiceItems or null if none.
setFirstChance
public void setFirstChance(boolean isFirstChance)
- Sets whether this is the "first chance" to make a match for this
need. The default is false.
- Parameters:
- isFirstChance - true for first chance, false for not.
isFirstChance
public boolean isFirstChance()
- Determines whether this is the "first chance" or not.
- Returns:
- true if first chance or false if not.
setLastChance
public void setLastChance(boolean isLastChance)
- Sets whether this is the "last chance" to make a match for this
need. The default is false.
- Parameters:
- isLastChance - true for last chance, false for not.
isLastChance
public boolean isLastChance()
- Determines whether this is the "last chance" or not.
- Returns:
- true if last chance or false if not.
All Packages Class Hierarchy This Package Previous Next Index