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.


Constructor Index

 o MatchChanceStd()

Method Index

 o getItems()
Returns the ServiceItems involved in the match or null if none.
 o getNeed()
Returns the need involved in the match.
 o isFirstChance()
Determines whether this is the "first chance" or not.
 o isLastChance()
Determines whether this is the "last chance" or not.
 o setFirstChance(boolean)
Sets whether this is the "first chance" to make a match for this need.
 o setItems(Enumeration)
Sets the ServiceItems involved in the match.
 o setLastChance(boolean)
Sets whether this is the "last chance" to make a match for this need.
 o setNeed(ServiceNeed)
Sets the need involved in the match.

Constructors

 o MatchChanceStd
 public MatchChanceStd()

Methods

 o setNeed
 public void setNeed(ServiceNeed need)
Sets the need involved in the match. This is required.

Parameters:
need - the need involved in the match.
 o getNeed
 public ServiceNeed getNeed()
Returns the need involved in the match.

Returns:
the need.
 o setItems
 public void setItems(Enumeration items)
Sets the ServiceItems involved in the match. The default is null.

Parameters:
items - the Enumeration of ServiceItems.
 o getItems
 public Enumeration getItems()
Returns the ServiceItems involved in the match or null if none.

Returns:
the Enumeration of ServiceItems or null if none.
 o 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.
 o isFirstChance
 public boolean isFirstChance()
Determines whether this is the "first chance" or not.

Returns:
true if first chance or false if not.
 o 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.
 o 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