com.github.mustachejava.codes.DepthLimitedWriter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compiler Show documentation
Show all versions of compiler Show documentation
Implementation of mustache.js for Java
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