Java Code Examples for org.yaml.snakeyaml.emitter.Emitter#MAX_INDENT

The following examples show how to use org.yaml.snakeyaml.emitter.Emitter#MAX_INDENT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DumperOptions.java    From orion.server with Eclipse Public License 1.0 5 votes vote down vote up
public void setIndent(int indent) {
    if (indent < Emitter.MIN_INDENT) {
        throw new YAMLException("Indent must be at least " + Emitter.MIN_INDENT);
    }
    if (indent > Emitter.MAX_INDENT) {
        throw new YAMLException("Indent must be at most " + Emitter.MAX_INDENT);
    }
    this.indent = indent;
}
 
Example 2
Source File: DumperOptions.java    From snake-yaml with Apache License 2.0 5 votes vote down vote up
public void setIndent(int indent) {
    if (indent < Emitter.MIN_INDENT) {
        throw new YAMLException("Indent must be at least " + Emitter.MIN_INDENT);
    }
    if (indent > Emitter.MAX_INDENT) {
        throw new YAMLException("Indent must be at most " + Emitter.MAX_INDENT);
    }
    this.indent = indent;
}
 
Example 3
Source File: DumperOptions.java    From snake-yaml with Apache License 2.0 5 votes vote down vote up
public void setIndicatorIndent(int indicatorIndent) {
    if (indicatorIndent < 0) {
        throw new YAMLException("Indicator indent must be non-negative.");
    }
    if (indicatorIndent > Emitter.MAX_INDENT - 1) {
        throw new YAMLException("Indicator indent must be at most Emitter.MAX_INDENT-1: " + (Emitter.MAX_INDENT - 1));
    }
    this.indicatorIndent = indicatorIndent;
}