Class StringFieldConverter

java.lang.Object
com.yahoo.vespa.indexinglanguage.FieldValueConverter
com.yahoo.vespa.indexinglanguage.StringFieldConverter

public abstract class StringFieldConverter extends FieldValueConverter
Author:
Simon Thoresen Hult
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final com.yahoo.document.datatypes.FieldValue
    doConvert(com.yahoo.document.datatypes.FieldValue value)
    Converts the given value.
    protected abstract com.yahoo.document.datatypes.FieldValue
    doConvert(com.yahoo.document.datatypes.StringFieldValue value)
     
    protected final boolean
    shouldConvert(com.yahoo.document.datatypes.FieldValue value)
    Returns whether the given FieldValue should be converted.

    Methods inherited from class com.yahoo.vespa.indexinglanguage.FieldValueConverter

    convert, convertMap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StringFieldConverter

      public StringFieldConverter()
  • Method Details

    • shouldConvert

      protected final boolean shouldConvert(com.yahoo.document.datatypes.FieldValue value)
      Description copied from class: FieldValueConverter
      Returns whether the given FieldValue should be converted. If this method returns false, the converter will proceed to traverse the value itself to see if its internal can be converted.
      Specified by:
      shouldConvert in class FieldValueConverter
      Parameters:
      value - the value to check
      Returns:
      true to convert, false to traverse
    • doConvert

      protected final com.yahoo.document.datatypes.FieldValue doConvert(com.yahoo.document.datatypes.FieldValue value)
      Description copied from class: FieldValueConverter
      Converts the given value. It is IMPERATIVE that the implementation of this method DOES NOT mutate the given FieldValue in place, as that can cause SERIOUS inconsistencies in the parent structures.
      Specified by:
      doConvert in class FieldValueConverter
      Parameters:
      value - the value to convert
      Returns:
      the value to replace the old
    • doConvert

      protected abstract com.yahoo.document.datatypes.FieldValue doConvert(com.yahoo.document.datatypes.StringFieldValue value)