blob: e8bf6ceda21b6ffc25a768515f6d01db92cd5c97 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.derived;
import com.yahoo.searchdefinition.document.RankType;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
/**
* The definition of a rank type used for native rank features.
*
* @author geirst
*/
public class NativeRankTypeDefinition {
/** The type this defines */
private RankType type;
/** The rank tables of this rank type */
private List<NativeTable> rankTables = new java.util.ArrayList<>();
public NativeRankTypeDefinition(RankType type) {
this.type = type;
}
public RankType getType() {
return type;
}
public void addTable(NativeTable table) {
rankTables.add(table);
}
/** Returns an unmodifiable list of the tables in this type definition */
public Iterator<NativeTable> rankSettingIterator() {
return Collections.unmodifiableList(rankTables).iterator();
}
public String toString() {
return "native definition of rank type '" + type + "'";
}
}
|