blob: 475f99640f280562886690cd7ac1524242e47ed1 (
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
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.semantics.engine;
import com.yahoo.prelude.query.TermItem;
/**
* An item which knows its position in its parent
*
* @author bratseth
*/
public class FlattenedItem {
private TermItem item;
/** The position of this item in its parent */
private int position;
public FlattenedItem(TermItem item,int position) {
this.item=item;
this.position=position;
}
public TermItem getItem() { return item; }
public int getPosition() { return position; }
public String toString() {
return position + ":" + item;
}
}
|