Package com.yahoo.vespa.indexinglanguage
Class StringFieldConverter
java.lang.Object
com.yahoo.vespa.indexinglanguage.FieldValueConverter
com.yahoo.vespa.indexinglanguage.StringFieldConverter
- Author:
- Simon Thoresen Hult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final com.yahoo.document.datatypes.FieldValuedoConvert(com.yahoo.document.datatypes.FieldValue value) Converts the given value.protected abstract com.yahoo.document.datatypes.FieldValuedoConvert(com.yahoo.document.datatypes.StringFieldValue value) protected final booleanshouldConvert(com.yahoo.document.datatypes.FieldValue value) Returns whether the givenFieldValueshould be converted.Methods inherited from class com.yahoo.vespa.indexinglanguage.FieldValueConverter
convert, convertMap
-
Constructor Details
-
StringFieldConverter
public StringFieldConverter()
-
-
Method Details
-
shouldConvert
protected final boolean shouldConvert(com.yahoo.document.datatypes.FieldValue value) Description copied from class:FieldValueConverterReturns whether the givenFieldValueshould 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:
shouldConvertin classFieldValueConverter- 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:FieldValueConverterConverts the given value. It is IMPERATIVE that the implementation of this method DOES NOT mutate the givenFieldValuein place, as that can cause SERIOUS inconsistencies in the parent structures.- Specified by:
doConvertin classFieldValueConverter- 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)
-