Class ScriptStats.ScriptGauge

java.lang.Object
org.microproxy.starlark.ScriptStats.ScriptGauge
All Implemented Interfaces:
org.microproxy.thirdparty.starlark.eval.StarlarkValue
Enclosing class:
ScriptStats

public static final class ScriptStats.ScriptGauge extends Object implements org.microproxy.thirdparty.starlark.eval.StarlarkValue
A gauge of a script.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    dec(org.microproxy.thirdparty.starlark.eval.StarlarkInt n)
    gauge.dec(n=1).
    void
    inc(org.microproxy.thirdparty.starlark.eval.StarlarkInt n)
    gauge.inc(n=1).
    void
    repr(org.microproxy.thirdparty.starlark.eval.Printer printer, org.microproxy.thirdparty.starlark.eval.StarlarkSemantics semantics)
    Prints an official representation of object x.
    void
    set(org.microproxy.thirdparty.starlark.eval.StarlarkInt value)
    gauge.set(value).
    org.microproxy.thirdparty.starlark.eval.StarlarkInt
    gauge.value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.microproxy.thirdparty.starlark.eval.StarlarkValue

    checkHashable, debugPrint, getStarlarkType, isAcyclic, isImmutable, str, truth
  • Method Details

    • set

      public void set(org.microproxy.thirdparty.starlark.eval.StarlarkInt value) throws org.microproxy.thirdparty.starlark.eval.EvalException
      gauge.set(value).
      Parameters:
      value - the new value
      Throws:
      org.microproxy.thirdparty.starlark.eval.EvalException - if it is too large
    • inc

      public void inc(org.microproxy.thirdparty.starlark.eval.StarlarkInt n) throws org.microproxy.thirdparty.starlark.eval.EvalException
      gauge.inc(n=1).
      Parameters:
      n - how much to add
      Throws:
      org.microproxy.thirdparty.starlark.eval.EvalException - if it is too large
    • dec

      public void dec(org.microproxy.thirdparty.starlark.eval.StarlarkInt n) throws org.microproxy.thirdparty.starlark.eval.EvalException
      gauge.dec(n=1).
      Parameters:
      n - how much to subtract
      Throws:
      org.microproxy.thirdparty.starlark.eval.EvalException - if it is too large
    • value

      public org.microproxy.thirdparty.starlark.eval.StarlarkInt value()
      gauge.value.
      Returns:
      the current value
    • 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.StarlarkValue
      Prints 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:
      repr in interface org.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