Record Class MibEmbeddingIndex.SearchResult

java.lang.Object
java.lang.Record
org.snmp4j.mcp.tool.mib.semantic.MibEmbeddingIndex.SearchResult
Record Components:
score - cosine similarity in [0, 1]; higher is more relevant
oid - dotted-decimal OID string
name - object name
typeStr - SmiType name
syntaxStr - SmiSyntax syntax
descriptionSnippet - excerpt from the best-matching chunk, or null
Enclosing class:
MibEmbeddingIndex

public static record MibEmbeddingIndex.SearchResult(float score, String oid, String name, String typeStr, String syntaxStr, String descriptionSnippet) extends Record
A single search hit with its cosine-similarity score.
Since:
1.0.0
  • Constructor Details

    • SearchResult

      public SearchResult(float score, String oid, String name, String typeStr, String syntaxStr, String descriptionSnippet)
      Creates an instance of a SearchResult record class.
      Parameters:
      score - the value for the score record component
      oid - the value for the oid record component
      name - the value for the name record component
      typeStr - the value for the typeStr record component
      syntaxStr - the value for the syntaxStr record component
      descriptionSnippet - the value for the descriptionSnippet record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • score

      public float score()
      Returns the value of the score record component.
      Returns:
      the value of the score record component
    • oid

      public String oid()
      Returns the value of the oid record component.
      Returns:
      the value of the oid record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • typeStr

      public String typeStr()
      Returns the value of the typeStr record component.
      Returns:
      the value of the typeStr record component
    • syntaxStr

      public String syntaxStr()
      Returns the value of the syntaxStr record component.
      Returns:
      the value of the syntaxStr record component
    • descriptionSnippet

      public String descriptionSnippet()
      Returns the value of the descriptionSnippet record component.
      Returns:
      the value of the descriptionSnippet record component