##### Coverage Report - org.yaml.snakeyaml.scanner.SimpleKey

Classes in this File | Line Coverage | Branch Coverage | Complexity
SimpleKey |
100% | 15/15
N/A | N/A
| 1.0;1

1 |  |
     /**
2 |  |
      * Copyright (c) 2008-2011, http://www.snakeyaml.org
3 |  |
      *
4 |  |
      * Licensed under the Apache License, Version 2.0 (the "License");
5 |  |
      * you may not use this file except in compliance with the License.
6 |  |
      * You may obtain a copy of the License at
7 |  |
      *
8 |  |
      *     http://www.apache.org/licenses/LICENSE-2.0
9 |  |
      *
10 |  |
      * Unless required by applicable law or agreed to in writing, software
11 |  |
      * distributed under the License is distributed on an "AS IS" BASIS,
12 |  |
      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  |
      * See the License for the specific language governing permissions and
14 |  |
      * limitations under the License.
15 |  |
      */
16 |  |
17 |  |
     package org.yaml.snakeyaml.scanner;
18 |  |
19 |  |
     import org.yaml.snakeyaml.error.Mark;
20 |  |
21 |  |
     /**
22 |  |
      * Simple keys treatment.
23 |  |
      * <p>
24 |  |
      * Helper class for {@link ScannerImpl}.
25 |  |
      * </p>
26 |  |
      *
27 |  |
      * @see ScannerImpl
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 |  |
     }