Class SearchOrderer

java.lang.Object
com.yahoo.schema.derived.SearchOrderer

public class SearchOrderer extends 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 Details

    • SearchOrderer

      public SearchOrderer()
  • Method Details

    • order

      public List<Schema> order(List<Schema> 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