Rename WriterIndentationPolicy to IndentationPolicy

This commit is contained in:
moandji.ezana 2015-07-02 07:21:48 +02:00
parent 7d5e429e12
commit 47bd5022f1
3 changed files with 8 additions and 8 deletions

View file

@ -5,12 +5,12 @@ package com.moandjiezana.toml;
*
* The default policy is to not indent.
*/
class WriterIndentationPolicy {
class IndentationPolicy {
private final int tableIndent;
private final int keyValueIndent;
private final int arrayDelimiterPadding;
WriterIndentationPolicy(int keyIndentation, int tableIndentation, int arrayDelimiterPadding) {
IndentationPolicy(int keyIndentation, int tableIndentation, int arrayDelimiterPadding) {
this.keyValueIndent = keyIndentation;
this.tableIndent = tableIndentation;
this.arrayDelimiterPadding = arrayDelimiterPadding;

View file

@ -77,7 +77,7 @@ public class TomlWriter {
}
}
private final WriterIndentationPolicy indentationPolicy;
private final IndentationPolicy indentationPolicy;
private final DatePolicy datePolicy;
/**
@ -88,7 +88,7 @@ public class TomlWriter {
}
private TomlWriter(int keyIndentation, int tableIndentation, int arrayDelimiterPadding, TimeZone timeZone, boolean showFractionalSeconds) {
this.indentationPolicy = new WriterIndentationPolicy(keyIndentation, tableIndentation, arrayDelimiterPadding);
this.indentationPolicy = new IndentationPolicy(keyIndentation, tableIndentation, arrayDelimiterPadding);
this.datePolicy = new DatePolicy(timeZone, showFractionalSeconds);
}

View file

@ -12,10 +12,10 @@ class WriterContext {
private final String currentTableIndent;
private final String currentFieldIndent;
private final Writer output;
private final WriterIndentationPolicy indentationPolicy;
private final IndentationPolicy indentationPolicy;
private final DatePolicy datePolicy;
WriterContext(WriterIndentationPolicy indentationPolicy, DatePolicy datePolicy, Writer output) {
WriterContext(IndentationPolicy indentationPolicy, DatePolicy datePolicy, Writer output) {
this("", "", output, indentationPolicy, datePolicy);
}
@ -123,7 +123,7 @@ class WriterContext {
return key.isEmpty() ? arrayKey : key + "." + arrayKey;
}
private String growIndent(WriterIndentationPolicy indentationPolicy) {
private String growIndent(IndentationPolicy indentationPolicy) {
return currentTableIndent + fillStringWithSpaces(indentationPolicy.getTableIndent());
}
@ -134,7 +134,7 @@ class WriterContext {
return new String(chars);
}
private WriterContext(String key, String tableIndent, Writer output, WriterIndentationPolicy indentationPolicy, DatePolicy datePolicy) {
private WriterContext(String key, String tableIndent, Writer output, IndentationPolicy indentationPolicy, DatePolicy datePolicy) {
this.key = key;
this.output = output;
this.indentationPolicy = indentationPolicy;