Class TensorFieldType
- java.lang.Object
-
- com.yahoo.search.query.profile.types.FieldType
-
- com.yahoo.search.query.profile.types.TensorFieldType
-
public class TensorFieldType extends FieldType
A tensor field type in a query profile- Author:
- bratseth
-
-
Field Summary
-
Fields inherited from class com.yahoo.search.query.profile.types.FieldType
booleanType, doubleType, floatType, genericQueryProfileType, integerType, longType, queryType, stringType
-
-
Constructor Summary
Constructors Constructor Description TensorFieldType(com.yahoo.tensor.TensorType type)
Creates a tensor field type with information about the kind of tensor this will hold
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.yahoo.tensor.TensorType
asTensorType()
Returns information about the type of tensor this will holdjava.lang.Object
convertFrom(java.lang.Object o, QueryProfileRegistry registry)
Converts the given type to an instance of this type, if possible.java.lang.Object
convertFrom(java.lang.Object o, ConversionContext context)
Converts the given type to an instance of this type, if possible.static TensorFieldType
fromTypeString(java.lang.String s)
java.lang.Class
getValueClass()
Returns the class of instance values of this field typejava.lang.String
stringValue()
Returns a string representation of this type which can be converted back to a type class byFieldType.fromString(java.lang.String, com.yahoo.search.query.profile.types.QueryProfileTypeRegistry)
java.lang.String
toInstanceDescription()
Returns a string describing possible instances of this type, suitable for user error messagesjava.lang.String
toString()
-
Methods inherited from class com.yahoo.search.query.profile.types.FieldType
fromString, isLegalFieldValue
-
-
-
-
Method Detail
-
asTensorType
public com.yahoo.tensor.TensorType asTensorType()
Returns information about the type of tensor this will hold- Overrides:
asTensorType
in classFieldType
-
getValueClass
public java.lang.Class getValueClass()
Description copied from class:FieldType
Returns the class of instance values of this field type- Specified by:
getValueClass
in classFieldType
-
stringValue
public java.lang.String stringValue()
Description copied from class:FieldType
Returns a string representation of this type which can be converted back to a type class byFieldType.fromString(java.lang.String, com.yahoo.search.query.profile.types.QueryProfileTypeRegistry)
- Specified by:
stringValue
in classFieldType
-
toInstanceDescription
public java.lang.String toInstanceDescription()
Description copied from class:FieldType
Returns a string describing possible instances of this type, suitable for user error messages- Specified by:
toInstanceDescription
in classFieldType
-
convertFrom
public java.lang.Object convertFrom(java.lang.Object o, QueryProfileRegistry registry)
Description copied from class:FieldType
Converts the given type to an instance of this type, if possible. Returns null if not possible.- Specified by:
convertFrom
in classFieldType
-
convertFrom
public java.lang.Object convertFrom(java.lang.Object o, ConversionContext context)
Description copied from class:FieldType
Converts the given type to an instance of this type, if possible. Returns null if not possible.- Specified by:
convertFrom
in classFieldType
-
fromTypeString
public static TensorFieldType fromTypeString(java.lang.String s)
-
-