Package org.bson.types
Class Code
- java.lang.Object
-
- org.bson.types.Code
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
CodeWithScope,CodeWScope
public class Code extends java.lang.Object implements java.io.SerializableFor using the Code type.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Code(java.lang.String code)Construct a new instance with the given code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetCode()Get the Javascript code.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getCode
public java.lang.String getCode()
Get the Javascript code.- Returns:
- the code
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-