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;
15 private final boolean tagged;
17 protected WriterParameters(final WriterParametersBuilder builder) {
18 depth = builder.depth;
19 prettyPrint = builder.prettyPrint;
20 tagged = builder.tagged;
23 public Integer getDepth() {
27 public boolean isPrettyPrint() {
31 public boolean isTagged() {
35 public static class WriterParametersBuilder {
36 private Integer depth;
37 private boolean prettyPrint;
38 private boolean tagged;
40 public WriterParametersBuilder() {
44 public WriterParametersBuilder setDepth(final int depth) {
49 public WriterParametersBuilder setPrettyPrint(final boolean prettyPrint) {
50 this.prettyPrint = prettyPrint;
54 public WriterParameters build() {
55 return new WriterParameters(this);
58 public void setTagged(final boolean tagged) {