##### Coverage Report - org.yaml.snakeyaml.tokens.ScalarToken

Classes in this File | Line Coverage | Branch Coverage | Complexity
ScalarToken |
100% | 12/12
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.tokens;
18 |  |
19 |  |
     import org.yaml.snakeyaml.error.Mark;
20 |  |
21 |  |
     public final class ScalarToken extends Token {
22 |  |
         private final String value;
23 |  |
         private final boolean plain;
24 |  |
         private final char style;
25 |  |
26 |  |
         public ScalarToken(String value, Mark startMark, Mark endMark, boolean plain) {
27 | 153208 |
             this(value, plain, startMark, endMark, (char) 0);
28 | 153208 |
         }
29 |  |
30 |  |
         public ScalarToken(String value, boolean plain, Mark startMark, Mark endMark, char style) {
31 | 363730 |
             super(startMark, endMark);
32 | 363730 |
             this.value = value;
33 | 363730 |
             this.plain = plain;
34 | 363730 |
             this.style = style;
35 | 363730 |
         }
36 |  |
37 |  |
         public boolean getPlain() {
38 | 361428 |
             return this.plain;
39 |  |
         }
40 |  |
41 |  |
         public String getValue() {
42 | 362786 |
             return this.value;
43 |  |
         }
44 |  |
45 |  |
         public char getStyle() {
46 | 361428 |
             return this.style;
47 |  |
         }
48 |  |
49 |  |
         @Override
50 |  |
         protected String getArguments() {
51 | 4 |
             return "value=" + value + ", plain=" + plain + ", style=" + style;
52 |  |
         }
53 |  |
54 |  |
         @Override
55 |  |
         public Token.ID getTokenId() {
56 | 2034432 |
             return ID.Scalar;
57 |  |
         }
58 |  |
     }