Class SearchIndexEntry

java.lang.Object
games.stendhal.server.core.rp.searchindex.SearchIndexEntry

public class SearchIndexEntry extends Object
a search index entry
Author:
hendrik
  • Constructor Details

    • SearchIndexEntry

      public SearchIndexEntry(String searchTerm, char entityType, String entityName, int searchScore)
      a search index entry
      Parameters:
      searchTerm - the search term, usually a phrase or a single word
      entityType - type of entity (A achievement, I item, C creatures, N NPC, Z zone)
      entityName - name of entity
      searchScore - score of this match (30: match on the complete name, 20: match on parts of the name, 10: match on parts of the descriptions)
    • SearchIndexEntry

      public SearchIndexEntry(String searchTerm, char entityType, String entityName, int searchScore, int dbId)
      a search index entry
      Parameters:
      searchTerm - the search term, usually a phrase or a single word
      entityType - type of entity (A achievement, I item, C creatures, N NPC, Z zone)
      entityName - name of entity
      searchScore - score of this match (30: match on the complete name, 20: match on parts of the name, 10: match on parts of the descriptions)
      dbId - database table id
  • Method Details

    • getSearchTerm

      public String getSearchTerm()
      gets the search term
      Returns:
      search term
    • getEntityType

      public char getEntityType()
      gets the entity type
      Returns:
      entity type
    • getEntityName

      public String getEntityName()
      gets the entity name
      Returns:
      name of entity
    • getSearchScore

      public int getSearchScore()
      gets the search score
      Returns:
      search score
    • getDbId

      public int getDbId()
      gets the database id
      Returns:
      database id or -1
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object