Package org.microproxy.starlark
Class ScriptStats.ScriptHistogram
java.lang.Object
org.microproxy.starlark.ScriptStats.ScriptHistogram
- All Implemented Interfaces:
org.microproxy.thirdparty.starlark.eval.StarlarkValue
- Enclosing class:
ScriptStats
public static final class ScriptStats.ScriptHistogram
extends Object
implements org.microproxy.thirdparty.starlark.eval.StarlarkValue
A histogram of a script.
-
Method Summary
Modifier and TypeMethodDescriptionorg.microproxy.thirdparty.starlark.eval.StarlarkIntcount()histogram.count.voidhistogram.record(value).voidrepr(org.microproxy.thirdparty.starlark.eval.Printer printer, org.microproxy.thirdparty.starlark.eval.StarlarkSemantics semantics) Prints an official representation of object x.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.microproxy.thirdparty.starlark.eval.StarlarkValue
checkHashable, debugPrint, getStarlarkType, isAcyclic, isImmutable, str, truth
-
Method Details
-
record
histogram.record(value).- Parameters:
value- an int or a float- Throws:
org.microproxy.thirdparty.starlark.eval.EvalException- if it is not a finite number
-
count
public org.microproxy.thirdparty.starlark.eval.StarlarkInt count()histogram.count.- Returns:
- how many values were recorded
-
repr
public void repr(org.microproxy.thirdparty.starlark.eval.Printer printer, org.microproxy.thirdparty.starlark.eval.StarlarkSemantics semantics) Description copied from interface:org.microproxy.thirdparty.starlark.eval.StarlarkValuePrints an official representation of object x.Convention is that the string should be parseable back to the value x. If this isn't feasible then it should be a short human-readable description enclosed in angled brackets, e.g.
"<foo object>".- Specified by:
reprin interfaceorg.microproxy.thirdparty.starlark.eval.StarlarkValue- Parameters:
printer- a printer to be used for formatting nested values.semantics- the interpreter settings used to format nested values
-