Class SearchOrderer
- java.lang.Object
-
- com.yahoo.searchdefinition.derived.SearchOrderer
-
public class SearchOrderer extends java.lang.Object
A class which can reorder a list of search definitions such that any supertype always preceed any subtype. Subject to this condition the given order is preserved (the minimal reordering is done).
This class is not multithread safe. Only one ordering must be done at the time in any instance.
- Author:
- bratseth, bjorncs
-
-
Constructor Summary
Constructors Constructor Description SearchOrderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Search>
order(java.util.List<Search> unordered)
Reorders the given list of search definitions such that any supertype always preceed any subtype.
-
-
-
Method Detail
-
order
public java.util.List<Search> order(java.util.List<Search> unordered)
Reorders the given list of search definitions such that any supertype always preceed any subtype. Subject to this condition the given order is preserved (the minimal reordering is done).- Returns:
- a new list containing the same search instances in the right order
-
-