From 08f4f7bc91709cc1c59e165e2882ca7c679d496f Mon Sep 17 00:00:00 2001 From: Nathan Sweet Date: Thu, 26 Jan 2023 12:27:50 -0400 Subject: [PATCH] Added missing ReadConfig autoMerge setter. #87 --- .../yamlbeans/YamlConfig.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/com/esotericsoftware/yamlbeans/YamlConfig.java b/src/com/esotericsoftware/yamlbeans/YamlConfig.java index a779746..78edd05 100644 --- a/src/com/esotericsoftware/yamlbeans/YamlConfig.java +++ b/src/com/esotericsoftware/yamlbeans/YamlConfig.java @@ -142,7 +142,7 @@ static public class WriteConfig { WriteClassName writeClassName = WriteClassName.AUTO; Quote quote = Quote.NONE; Version version; - Map tags; + Map tags; boolean flowStyle; EmitterConfig emitterConfig = new EmitterConfig(); @@ -201,7 +201,7 @@ public void setVersion (Version version) { } /** Sets the YAML tags to output. */ - public void setTags(Map tags) { + public void setTags (Map tags) { this.tags = tags; } @@ -240,21 +240,21 @@ public void setQuoteChar (Quote quote) { this.quote = quote; } - public Quote getQuote() { + public Quote getQuote () { return quote; } /** If true, the YAML output will be flow. Default is false. */ - public void setFlowStyle(boolean flowStyle) { + public void setFlowStyle (boolean flowStyle) { this.flowStyle = flowStyle; } - public boolean isFlowStyle() { + public boolean isFlowStyle () { return flowStyle; } /** If true, the YAML output will be pretty flow. Default is false. */ - public void setPrettyFlow(boolean prettyFlow) { + public void setPrettyFlow (boolean prettyFlow) { emitterConfig.setPrettyFlow(prettyFlow); } } @@ -310,6 +310,11 @@ public void setClassTags (boolean classTags) { this.classTags = classTags; } + /** When false, the merge key (<<) is not used to merge values into the current map. Default is true. */ + public void setAutoMerge (boolean autoMerge) { + this.autoMerge = autoMerge; + } + /** When true, if the type for a scalar value is unknown and it looks like a number, it is read as a double or long. When * false, if the type for a scalar value is unknown it is always read a string. Default is true. */ public void setGuessNumberTypes (boolean guessNumberTypes) { @@ -335,7 +340,7 @@ public static enum Quote { this.c = c; } - public char getStyle() { + public char getStyle () { return c; } }