java.lang.Object
software.amazon.awssdk.services.sagemakerfeaturestoreruntime.endpoints.internal.Scope<T>

public class Scope<T> extends Object
  • Constructor Details

    • Scope

      public Scope()
  • Method Details

    • push

      public void push()
    • pop

      public void pop()
    • insert

      public void insert(String name, T value)
    • insert

      public void insert(Identifier name, T value)
    • insertFact

      public void insertFact(Expr name, T value)
    • inScope

      public <U> U inScope(Supplier<U> func)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • eval

      public Optional<T> eval(Expr expr)
      Search the fact stack for an explicitly calculated value for [expr]

      Currently, this is only impacted by the `isSet` function which will record `T`, rather than Option<T> for its arguments

      Parameters:
      expr - The expression to evaluate
      Returns:
      The value from the scope
    • expectValue

      public T expectValue(Identifier name)
    • getValue

      public Optional<T> getValue(Identifier name)