Class SimpleSeqSimilaritySearchResult

    • Constructor Detail

      • SimpleSeqSimilaritySearchResult

        public SimpleSeqSimilaritySearchResult​(Sequence querySequence,
                                               SequenceDB sequenceDB,
                                               java.util.Map searchParameters,
                                               java.util.List hits,
                                               Annotation annotation)
        Creates a new SimpleSeqSimilaritySearchResult.
        Parameters:
        querySequence - a Sequence.
        sequenceDB - a SequenceDB.
        searchParameters - a Map.
        annotation - an Annotation.
        hits - a List.
    • Method Detail

      • getHits

        public java.util.List getHits()
        Description copied from interface: SeqSimilaritySearchResult
        Return all hits in this sequence similarity search result. The hits are sorted from best to worst.
        Specified by:
        getHits in interface SeqSimilaritySearchResult
        Returns:
        an (immutable) List of SeqSimilaritySearchHit objects containing all hits in the search result. Never returns null but may return an empty list.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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

        protected ChangeSupport getChangeSupport​(ChangeType ct)
        Description copied from class: AbstractChangeable
        Called to retrieve the ChangeSupport for this object.

        Your implementation of this method should have the following structure:

         ChangeSupport cs = super.getChangeSupport(ct);
        
         if(someForwarder == null && ct.isMatching(SomeInterface.SomeChangeType)) {
           someForwarder = new ChangeForwarder(...
        
           this.stateVariable.addChangeListener(someForwarder, VariableInterface.AChange);
         }
        
         return cs;
         
        It is usual for the forwarding listeners (someForwarder in this example) to be transient and lazily instantiated. Be sure to register & unregister the forwarder in the code that does the ChangeEvent handling in setter methods.
        Overrides:
        getChangeSupport in class AbstractChangeable