1 package org.opendaylight.controller.sal.restconf.impl;
3 import com.google.common.base.Optional;
5 public class WriterParameters {
6 private final Optional<Integer> depth;
7 private final boolean prettyPrint;
9 private WriterParameters(final WriterParametersBuilder builder) {
10 this.prettyPrint = builder.prettyPrint;
11 this.depth = builder.depth;
14 public Optional<Integer> getDepth() {
18 public boolean isPrettyPrint() {
22 public static class WriterParametersBuilder {
23 private Optional<Integer> depth = Optional.absent();
24 private boolean prettyPrint;
26 public WriterParametersBuilder() {
29 public Optional<Integer> getDepth() {
33 public WriterParametersBuilder setDepth(final int depth) {
34 this.depth = Optional.of(depth);
38 public boolean isPrettyPrint() {
42 public WriterParametersBuilder setPrettyPrint(final boolean prettyPrint) {
43 this.prettyPrint = prettyPrint;
47 public WriterParameters build() {
48 return new WriterParameters(this);