Class Code

java.lang.Object
org.bson.types.Code
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CodeWithScope, CodeWScope

public class Code extends Object implements Serializable
For using the Code type.
See Also:
  • Constructor Details

    • Code

      public Code(String code)
      Construct a new instance with the given code.
      Parameters:
      code - the JavaScript code
  • Method Details

    • getCode

      public String getCode()
      Get the JavaScript code.
      Returns:
      the code
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object