1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.yaml.snakeyaml.scanner; |
18 | |
|
19 | |
import org.yaml.snakeyaml.error.Mark; |
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
final class SimpleKey { |
30 | |
private int tokenNumber; |
31 | |
private boolean required; |
32 | |
private int index; |
33 | |
private int line; |
34 | |
private int column; |
35 | |
private Mark mark; |
36 | |
|
37 | 247554 | public SimpleKey(int tokenNumber, boolean required, int index, int line, int column, Mark mark) { |
38 | 247554 | this.tokenNumber = tokenNumber; |
39 | 247554 | this.required = required; |
40 | 247554 | this.index = index; |
41 | 247554 | this.line = line; |
42 | 247554 | this.column = column; |
43 | 247554 | this.mark = mark; |
44 | 247554 | } |
45 | |
|
46 | |
public int getTokenNumber() { |
47 | 490365 | return this.tokenNumber; |
48 | |
} |
49 | |
|
50 | |
public int getColumn() { |
51 | 135507 | return this.column; |
52 | |
} |
53 | |
|
54 | |
public Mark getMark() { |
55 | 323002 | return mark; |
56 | |
} |
57 | |
|
58 | |
public int getIndex() { |
59 | 493630 | return index; |
60 | |
} |
61 | |
|
62 | |
public int getLine() { |
63 | 599407 | return line; |
64 | |
} |
65 | |
|
66 | |
public boolean isRequired() { |
67 | 108558 | return required; |
68 | |
} |
69 | |
|
70 | |
@Override |
71 | |
public String toString() { |
72 | 1 | return "SimpleKey - tokenNumber=" + tokenNumber + " required=" + required + " index=" |
73 | |
+ index + " line=" + line + " column=" + column; |
74 | |
} |
75 | |
} |