Class SearchResult
- java.lang.Object
-
- com.complexible.stardog.api.search.SearchResult
-
- All Implemented Interfaces:
Copyable<SearchResult>
public final class SearchResult extends java.lang.Object implements Copyable<SearchResult>
Simple search result data structure.
- Since:
- 0.6.5
- Version:
- 6.0
- Author:
- Michael Grove
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchResult
copy()
Create a deep copy of the object which does not share any references with the original.static SearchResult
create(Resource theHit, double theScore, int theIndex)
boolean
equals(java.lang.Object o)
Resource
getHit()
Return the actual search hitint
getIndex()
Return the index of the hit in the resultsdouble
getScore()
Return the score of the hitint
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
create
public static SearchResult create(Resource theHit, double theScore, int theIndex)
-
copy
public SearchResult copy()
Create a deep copy of the object which does not share any references with the original.- Specified by:
copy
in interfaceCopyable<SearchResult>
- Returns:
- a copy of the object
-
getScore
public double getScore()
Return the score of the hit- Returns:
- the score
-
getIndex
public int getIndex()
Return the index of the hit in the results- Returns:
- the index
-
getHit
public Resource getHit()
Return the actual search hit- Returns:
- the hit of the search
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-