| /* |
| * See LICENSE file in distribution for copyright and licensing information. |
| */ |
| package org.yaml.snakeyaml.tokens; |
| |
| import org.yaml.snakeyaml.error.Mark; |
| |
| /** |
| * @see <a href="http://pyyaml.org/wiki/PyYAML">PyYAML</a> for more information |
| */ |
| public final class ScalarToken extends Token { |
| private final String value; |
| private final boolean plain; |
| private final char style; |
| |
| public ScalarToken(String value, Mark startMark, Mark endMark, boolean plain) { |
| this(value, plain, startMark, endMark, (char) 0); |
| } |
| |
| public ScalarToken(String value, boolean plain, Mark startMark, Mark endMark, char style) { |
| super(startMark, endMark); |
| this.value = value; |
| this.plain = plain; |
| this.style = style; |
| } |
| |
| public boolean getPlain() { |
| return this.plain; |
| } |
| |
| public String getValue() { |
| return this.value; |
| } |
| |
| public char getStyle() { |
| return this.style; |
| } |
| |
| @Override |
| protected String getArguments() { |
| return "value=" + value + ", plain=" + plain + ", style=" + style; |
| } |
| |
| @Override |
| public String getTokenId() { |
| return "<scalar>"; |
| } |
| } |