Class Resolution
java.lang.Object
com.yahoo.search.pagetemplates.engine.Resolution
A resolution of choices within a template.
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChoiceResolution
(Choice choice, int alternativeIndex) void
addMapChoiceResolution
(MapChoice choice, Map<String, List<PageElement>> mapping) int
getResolution
(Choice choice) Returns the resolution of a choice.getResolution
(MapChoice choice) Returns the resolution of a map choice.toString()
-
Constructor Details
-
Resolution
public Resolution()
-
-
Method Details
-
addChoiceResolution
-
addMapChoiceResolution
-
getResolution
Returns the resolution of a choice.- Returns:
- the (0-base) index of the choice made. If the given choice has exactly one alternative, 0 is always returned (whether or not the choice has been attempted resolved).
- Throws:
IllegalArgumentException
- if the choice is empty, or if it has multiple alternatives but have not been resolved in this
-
getResolution
Returns the resolution of a map choice.- Returns:
- the chosen mapping - entries from placeholder id to the values to use at the location of that placeholder
- Throws:
IllegalArgumentException
- if this choice has not been resolved in this
-
toString
-