Class Symbol

java.lang.Object
org.bson.types.Symbol
All Implemented Interfaces:
Serializable

public class Symbol extends Object implements Serializable
Class to hold an instance of the BSON symbol type.
See Also:
  • Constructor Details

    • Symbol

      public Symbol(String symbol)
      Construct a new instance with the given symbol.
      Parameters:
      symbol - the symbol
  • Method Details

    • getSymbol

      public String getSymbol()
      Gets the symbol.
      Returns:
      the symbol
    • equals

      public boolean equals(Object o)
      Will compare equal to a String that is equal to the String that this holds
      Overrides:
      equals in class Object
      Parameters:
      o - the Symbol to compare this to
      Returns:
      true if parameter o is the same as this Symbol
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object