Class SortOptionsChecker
- java.lang.Object
-
- com.google.appengine.api.search.checkers.SortOptionsChecker
-
public class SortOptionsChecker extends Object
Checks the values of aSortOptions.
-
-
Constructor Summary
Constructors Constructor Description SortOptionsChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcheckLimit(int limit)Checks whether the limit on number of documents to score is between 0 and the maximum.static com.google.appengine.api.search.proto.SearchServicePb.ScorerSpeccheckValid(com.google.appengine.api.search.proto.SearchServicePb.ScorerSpec spec)Checks theSearchServicePb.ScorerSpecis valid, specifically checking the limit on number of documents to score is not too large.
-
-
-
Method Detail
-
checkLimit
public static int checkLimit(int limit)
Checks whether the limit on number of documents to score is between 0 and the maximum.- Parameters:
limit- the maximum number of documents to score in the search- Returns:
- the checked limit
- Throws:
IllegalArgumentException- if the limit is out of range
-
checkValid
public static com.google.appengine.api.search.proto.SearchServicePb.ScorerSpec checkValid(com.google.appengine.api.search.proto.SearchServicePb.ScorerSpec spec)
Checks theSearchServicePb.ScorerSpecis valid, specifically checking the limit on number of documents to score is not too large.- Parameters:
spec- theSearchServicePb.ScorerSpecto check- Returns:
- the checked spec
- Throws:
IllegalArgumentException- if the spec is invalid
-
-