Class SearchResult


  • public class SearchResult
    extends java.lang.Object
    Describes a search result. Note that each model element may be included multiple times in a search result, e.g. via its simple and its qualified name.
    Author:
    Holger Eichelberger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object element
      The related element.
      private java.lang.String matchedName
      The matched name.
    • Constructor Summary

      Constructors 
      Constructor Description
      SearchResult​(java.lang.String matchedName, java.lang.Object element)
      Creates a search result.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getElement()
      Returns the related (model) element.
      java.lang.String getMatchedName()
      Returns the matched name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • matchedName

        private java.lang.String matchedName
        The matched name.
      • element

        private java.lang.Object element
        The related element. This is of type object as ModelElement is too restrictive, e.g. for project imports.
    • Constructor Detail

      • SearchResult

        SearchResult​(java.lang.String matchedName,
                     java.lang.Object element)
        Creates a search result.
        Parameters:
        matchedName - the matched name
        element - the related element
    • Method Detail

      • getMatchedName

        public java.lang.String getMatchedName()
        Returns the matched name.
        Returns:
        the matched name
      • getElement

        public java.lang.Object getElement()
        Returns the related (model) element.
        Returns:
        the related element