Class CodeWithScope

  • All Implemented Interfaces:
    java.io.Serializable

    public class CodeWithScope
    extends Code
    A representation of the JavaScript Code with Scope BSON type.
    Since:
    3.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CodeWithScope​(java.lang.String code, Document scope)
      Construct an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      Document getScope()
      Gets the scope, which is is a mapping from identifiers to values, representing the scope in which the code should be evaluated.
      int hashCode()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CodeWithScope

        public CodeWithScope​(java.lang.String code,
                             Document scope)
        Construct an instance.
        Parameters:
        code - the code
        scope - the scope
    • Method Detail

      • getScope

        public Document getScope()
        Gets the scope, which is is a mapping from identifiers to values, representing the scope in which the code should be evaluated.
        Returns:
        the scope
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class Code
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Code