2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.restconf.common.context;
10 public class WriterParameters {
11 static final WriterParameters EMPTY = new WriterParametersBuilder().build();
13 private final Integer depth;
14 private final boolean prettyPrint;
16 protected WriterParameters(final WriterParametersBuilder builder) {
17 depth = builder.depth;
18 prettyPrint = builder.prettyPrint;
21 public Integer getDepth() {
25 public boolean isPrettyPrint() {
29 public static class WriterParametersBuilder {
30 private Integer depth;
31 private boolean prettyPrint;
33 public WriterParametersBuilder() {
37 public WriterParametersBuilder setDepth(final int depth) {
42 public WriterParametersBuilder setPrettyPrint(final boolean prettyPrint) {
43 this.prettyPrint = prettyPrint;
47 public WriterParameters build() {
48 return new WriterParameters(this);