public class TensorFieldType extends FieldType
Modifier and Type | Field and Description |
---|---|
private Optional<com.yahoo.tensor.TensorType> |
type |
booleanType, doubleType, floatType, genericQueryProfileType, genericTensorType, integerType, longType, queryType, stringType
Constructor and Description |
---|
TensorFieldType(Optional<com.yahoo.tensor.TensorType> type)
Creates a tensor field type with optional information about the kind of tensor this will hold
|
Modifier and Type | Method and Description |
---|---|
Object |
convertFrom(Object o,
CompiledQueryProfileRegistry registry)
Converts the given type to an instance of this type, if possible.
|
Object |
convertFrom(Object o,
QueryProfileRegistry registry)
Converts the given type to an instance of this type, if possible.
|
static TensorFieldType |
fromTypeString(String s) |
Class |
getValueClass()
Returns the class of instance values of this field type
|
String |
stringValue()
Returns a string representation of this type which can be converted back to a type class by
FieldType.fromString(java.lang.String, com.yahoo.search.query.profile.types.QueryProfileTypeRegistry) |
String |
toInstanceDescription()
Returns a string describing possible instances of this type, suitable for user error messages
|
String |
toString() |
Optional<com.yahoo.tensor.TensorType> |
type()
Returns information about the type of tensor this will hold, or empty to allow any kind of tensor
|
fromClass, fromString
private final Optional<com.yahoo.tensor.TensorType> type
public TensorFieldType(Optional<com.yahoo.tensor.TensorType> type)
public Optional<com.yahoo.tensor.TensorType> type()
public Class getValueClass()
FieldType
getValueClass
in class FieldType
public String stringValue()
FieldType
FieldType.fromString(java.lang.String, com.yahoo.search.query.profile.types.QueryProfileTypeRegistry)
stringValue
in class FieldType
public String toInstanceDescription()
FieldType
toInstanceDescription
in class FieldType
public Object convertFrom(Object o, QueryProfileRegistry registry)
FieldType
convertFrom
in class FieldType
public Object convertFrom(Object o, CompiledQueryProfileRegistry registry)
FieldType
convertFrom
in class FieldType
public static TensorFieldType fromTypeString(String s)
Copyright © 2017. All rights reserved.