Package com.oracle.coherence.ai.search
Class ConverterResult<K,V>
java.lang.Object
com.oracle.coherence.ai.search.ConverterResult<K,V>
- Type Parameters:
K- the type of the vector keysV- the type of the query result
- All Implemented Interfaces:
QueryResult<K,,V> SerializationSupport,Serializable
public class ConverterResult<K,V>
extends Object
implements QueryResult<K,V>, Serializable, SerializationSupport
A wrapper around a
BinaryQueryResult that can convert
the result to a different type.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionTheConverterthat can deserialize binary data.protected final BinaryQueryResultThe wrappedBinaryQueryResult. -
Constructor Summary
ConstructorsConstructorDescriptionConverterResult(BinaryQueryResult wrapped, Converter<Binary, ?> converter) Create aConverterResult. -
Method Summary
Modifier and TypeMethodDescriptionReturn the wrappedBinaryQueryResult.Return theConverterused to convert serialized binary data to Object format data.doubleThe result value obtained by executing the query on the vector.getKey()Returns the key for the entry this result matches.getValue()Returns the value for the entry this result matches.toString()Designate an alternative object to be used when writing an object to the buffer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.tangosol.io.SerializationSupport
readResolve
-
Field Details
-
wrapped
The wrappedBinaryQueryResult. -
converter
TheConverterthat can deserialize binary data.
-
-
Constructor Details
-
ConverterResult
Create aConverterResult.- Parameters:
wrapped- theBinaryQueryResultto convertconverter- theConverterto convert binary serialized values to Object form
-
-
Method Details
-
getBinaryQueryResult
Return the wrappedBinaryQueryResult.- Returns:
- the wrapped
BinaryQueryResult
-
getConverter
Return theConverterused to convert serialized binary data to Object format data.- Returns:
- the
Converterused to convert serialized binary data to Object format data
-
getDistance
public double getDistance()Description copied from interface:QueryResultThe result value obtained by executing the query on the vector.- Specified by:
getDistancein interfaceQueryResult<K,V> - Returns:
- the result value obtained by executing the query on the vector
-
getKey
Description copied from interface:QueryResultReturns the key for the entry this result matches.- Specified by:
getKeyin interfaceQueryResult<K,V> - Returns:
- the key for the entry this result matches
-
getValue
Description copied from interface:QueryResultReturns the value for the entry this result matches.- Specified by:
getValuein interfaceQueryResult<K,V> - Returns:
- the value for the entry this result matches
-
toString
-
writeReplace
Description copied from interface:SerializationSupportDesignate an alternative object to be used when writing an object to the buffer.This method is invoked by the
Serializerif the object implementsSerializationSupportinterface.- Specified by:
writeReplacein interfaceSerializationSupport- Returns:
- an object which state should be written instead of the original one
- Throws:
ObjectStreamException
-