Package com.yahoo.tensor.functions
Interface ToStringContext<NAMETYPE extends Name>
-
- All Known Implementing Classes:
ToStringContext.EmptyStringContext
public interface ToStringContext<NAMETYPE extends Name>
A context which is passed down to all nested functions when returning a string representation.- Author:
- bratseth
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ToStringContext.EmptyStringContext<NAMETYPE extends Name>
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static <NAMETYPE extends Name>
ToStringContext<NAMETYPE>empty()
String
getBinding(String name)
Returns the name an identifier is bound to, or null if not bound in this contextToStringContext<NAMETYPE>
parent()
Returns the parent context of this (the context we're in scope of when this is created), or null if this is the root.default Optional<TypeContext<NAMETYPE>>
typeContext()
Returns the context used to resolve types in this, if present.
-
-
-
Method Detail
-
empty
static <NAMETYPE extends Name> ToStringContext<NAMETYPE> empty()
-
getBinding
String getBinding(String name)
Returns the name an identifier is bound to, or null if not bound in this context
-
typeContext
default Optional<TypeContext<NAMETYPE>> typeContext()
Returns the context used to resolve types in this, if present. In some functions serialization depends on type information.
-
parent
ToStringContext<NAMETYPE> parent()
Returns the parent context of this (the context we're in scope of when this is created), or null if this is the root.
-
-