Class DistanceResult<TYPE>

  • Type Parameters:
    TYPE - the type of the document.

    public class DistanceResult<TYPE>
    extends java.lang.Object
    Immutable generic distance result that contains a document type object and its distance (to some artificial queried document).
    Author:
    thomas.jungblut
    • Constructor Summary

      Constructors 
      Constructor Description
      DistanceResult​(double distance, TYPE document)
      Create a new DistanceResultImpl with a distance and a document.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TYPE get()  
      double getDistance()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DistanceResult

        public DistanceResult​(double distance,
                              TYPE document)
        Create a new DistanceResultImpl with a distance and a document.
        Parameters:
        distance - the distance.
        document - the document.
    • Method Detail

      • getDistance

        public double getDistance()
        Returns:
        the distance.
      • get

        public TYPE get()
        Returns:
        the document.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object