protected C instantiateContext() { return pool.isEmpty() ? Utils.getInstance(contextClass) : pool.pop(); }
protected static TestResourcesFixture getTestResourcesFixture() { try { File path = TestResourcesFixture.resourceNameToFile( SerializationTestBase.class, "/"); return new TestResourcesFixture(path); } catch (FileNotFoundException e) { throw new WrappedException(e); } }
public ConsoleProgressBar(long from, long to, int barLength) { this.lineLength = -1; setBounds(from, to, from); setBarLength(barLength); setIndicatorStep(1); setPercentageFormatString("%5.1f"); setOut(System.out); }
public void setBounds(long from, long to, long cur) { checkBounds(from, to); this.from = from; this.to = to; this.cur = cur; update(); }
public static StopWatch2 buildAndStart() { StopWatch2 sw = new StopWatch2(); sw.start(); return sw; }
public void echoSep(String title) { if (!quiet) printSep(title); }
/** * @return @{code true} if the next call to {@link #add(long)} will * overwrite the oldest value. */ public boolean willAddOverwrite() { return getN() == getCapacity(); }
public DualHashBidiMap(DualHashBidiMap other) { this(); putAll(other.normal); }
public void echoQuoted(String x) { if (!quiet) printQuoted(x); }
public static boolean isNameChar(int codePoint) { return isNameStartChar(codePoint) || codePoint == '-' || codePoint == '.' || (codePoint >= '0' && codePoint <= '9') || codePoint == 0x00B7 || (codePoint >= 0x0300 && codePoint <= 0x036F) || (codePoint >= 0x203F && codePoint <= 0x2040); } }
public Memoize(Object node, OutputBuffer outputBuffer) { this.o = node; this.state = outputBuffer.getStateOnStart(); this.outputBuffer = outputBuffer; }
public void setCur(long cur) { this.cur = cur; update(); }
protected void checkBounds(long from, long to) { if (to <= from) throw new FmtIllegalArgumentException("Illegal bounds!"); }
@Override public void visit(WtXmlAttribute n) { // TODO: Implement throw new FmtNotYetImplementedError(); }
public void setFrom(long from) { checkBounds(from, this.to); this.from = from; update(); }