public class FilterHelper
extends java.lang.Object
Constructor and Description |
---|
FilterHelper() |
Modifier and Type | Method and Description |
---|---|
static java.util.HashMap<java.lang.Integer,java.util.Set<SNNode>> |
filterIntegerNodeMap(java.util.HashMap<java.lang.Integer,java.util.Set<SNNode>> integerSetHashMap,
java.util.Set<SNNode> nodesToFilter)
Helper to filter a set of SNNodes from an Integer, SNNode-Set map.
|
static java.util.Set<Product> |
filterProductsForNeed(java.util.Set<Product> candidateProducts,
Need need)
Method to filter all products from a set of products that fulfil a given need.
|
static java.util.Set<Product> |
filterProductsNotOnMarketYet(java.util.Set<Product> products)
A method that filters all products from a set that are not yet introduced into the market
|
static java.util.Set<Product> |
filterUnadoptableProducts(java.util.Set<Product> potentialProducts,
ConsumerAgent consumerAgentConcerned)
Method to filter out all products that can't be adopted by the respective agent at this time,
operating on the basis of product dependencies (prerequisite products need to be adopted,
excluded product groups must not be adopted)
|
static java.util.Set<Product> |
filterUnintroducedProducts(java.util.Set<Product> potentialProducts) |
static Preference |
findCorrespondingPreference(java.util.Set<Preference> preferences,
Value consideredValue)
Method to retrieve the preference corresponding to a value within a set.
|
static java.util.Set<Product> |
selectKnownProducts(java.util.Map<Product,java.lang.Boolean> awarenessMap)
Method that selects all products an agent is aware of
(all product which have a 'true' value associated with them)
|
static java.util.Map<ProductGroupAttribute,java.lang.Double> |
selectPGAVMappingForValue(java.util.Set<ProductGroupAttributeValueMapping> productGroupAttributePreferenceMapping,
Value consideredValue)
Method to select a all product group attributes with their respective numerical value corresponding to a given value from a set of ProductGroupAttributeValueMappings.
|
public static java.util.Set<Product> selectKnownProducts(java.util.Map<Product,java.lang.Boolean> awarenessMap)
awarenessMap
- The awareness map used to determine if an agent is aware of the productpublic static java.util.Set<Product> filterProductsForNeed(java.util.Set<Product> candidateProducts, Need need)
candidateProducts
- The product to be filtered for need fulfilmentneed
- The need candidate products need to fulfilpublic static java.util.Set<Product> filterUnadoptableProducts(java.util.Set<Product> potentialProducts, ConsumerAgent consumerAgentConcerned)
potentialProducts
- The product that are to be filteredconsumerAgentConcerned
- The respective agent for which the adoptability should be checkedpublic static java.util.Set<Product> filterProductsNotOnMarketYet(java.util.Set<Product> products)
products
- The products that are to be checked upon market introductionpublic static java.util.Set<Product> filterUnintroducedProducts(java.util.Set<Product> potentialProducts)
public static Preference findCorrespondingPreference(java.util.Set<Preference> preferences, Value consideredValue) throws java.lang.IllegalArgumentException
preferences
- The preference set from which the preference corresponding to the value is to be selectedconsideredValue
- The value for which the corresponding reference should be retrievedjava.lang.IllegalArgumentException
- Will be thrown when several preferences refer to the same value (which is thought to be a 1-to-1 mapping)public static java.util.Map<ProductGroupAttribute,java.lang.Double> selectPGAVMappingForValue(java.util.Set<ProductGroupAttributeValueMapping> productGroupAttributePreferenceMapping, Value consideredValue)
productGroupAttributePreferenceMapping
- The set of ProductGroupAttributeValueMappings to be filtered for the respective valueconsideredValue
- The value for which the product group attributes should be selected forpublic static java.util.HashMap<java.lang.Integer,java.util.Set<SNNode>> filterIntegerNodeMap(java.util.HashMap<java.lang.Integer,java.util.Set<SNNode>> integerSetHashMap, java.util.Set<SNNode> nodesToFilter)
integerSetHashMap
- HashMap to filter the SNNode set fromnodesToFilter
- Nodes to filter from all values of the HashMap