Class StringValueImpl

java.lang.Object
org.wikidata.wdtk.datamodel.implementation.ValueImpl
org.wikidata.wdtk.datamodel.implementation.StringValueImpl
All Implemented Interfaces:
StringValue, Value

public class StringValueImpl extends ValueImpl implements StringValue
Jackson implementation of StringValue.
Author:
Fredo Erxleben, Antonin Delpeuch
  • Constructor Details

    • StringValueImpl

      public StringValueImpl(String value)
      Constructor for deserialization from JSON by Jackson.
      Parameters:
      value - the string represented by this Wikibase value
  • Method Details

    • getValue

      public String getValue()
      Returns the string. Only for use by Jackson during serialization.
      Returns:
      the string value
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getString

      public String getString()
      Description copied from interface: StringValue
      Get the string stored in this value.
      Specified by:
      getString in interface StringValue
      Returns:
      string value
    • accept

      public <T> T accept(ValueVisitor<T> valueVisitor)
      Description copied from interface: Value
      Accept a ValueVisitor and return its output.
      Specified by:
      accept in interface Value
      Parameters:
      valueVisitor - the ValueVisitor
      Returns:
      output of the visitor
    • toString

      public String toString()
      Overrides:
      toString in class Object