blob: 42913bd02bddadbdceb9105731244e244dd86c9f (
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
48
49
50
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.document.annotation;
import java.util.Collections;
import java.util.ListIterator;
/**
* @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
*/
class DummySpanNode extends SpanNode {
final static DummySpanNode INSTANCE = new DummySpanNode();
private DummySpanNode() {
}
@Override
public boolean isLeafNode() {
return true;
}
@Override
public ListIterator<SpanNode> childIterator() {
return Collections.<SpanNode>emptyList().listIterator();
}
@Override
public ListIterator<SpanNode> childIteratorRecursive() {
return Collections.<SpanNode>emptyList().listIterator();
}
@Override
public int getFrom() {
return 0;
}
@Override
public int getTo() {
return 0;
}
@Override
public int getLength() {
return 0;
}
@Override
public CharSequence getText(CharSequence text) {
return null;
}
}
|