blob: 2760b2b80e64c804e6b74a62d08e2899a06ea8bf (
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
45
46
47
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.grouping.result;
import com.yahoo.collections.LazyMap;
import com.yahoo.search.grouping.Continuation;
import com.yahoo.search.result.HitGroup;
import java.util.HashMap;
import java.util.Map;
/**
* @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
*/
public abstract class AbstractList extends HitGroup {
private final Map<String, Continuation> continuations = LazyMap.newHashMap();
private final String label;
/**
* <p>Constructs a new instance of this class.</p>
*
* @param type The type of this list.
* @param label The label of this list.
*/
public AbstractList(String type, String label) {
super(type + ":" + label);
this.label = label;
}
/**
* <p>Returns the label of this list.</p>
*
* @return The label.
*/
public String getLabel() {
return label;
}
/**
* <p>Returns the map of all possible {@link Continuation}s of this list.</p>
*
* @return The list of Continuations.
*/
public Map<String, Continuation> continuations() {
return continuations;
}
}
|