All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.honeybadger.com.github.mustachejava.codes.DepthLimitedWriter Maven / Gradle / Ivy

There is a newer version: 2.1.2
Show newest version
package com.github.mustachejava.codes;

import java.io.FilterWriter;
import java.io.Writer;
import java.util.concurrent.atomic.AtomicInteger;

class DepthLimitedWriter extends FilterWriter {
  private AtomicInteger depth = new AtomicInteger(0);
  public DepthLimitedWriter(Writer writer) {
    super(writer);
  }

  public int incr() {
    return depth.incrementAndGet();
  }

  public int decr() {
    return depth.decrementAndGet();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy