HitList<T extends HitDetail> Class

The result of a "locate" is a sorted list of objects that satisfied the search criteria (a HitList). Earlier hits in the list are somehow better than those later on.

Methods

Name Description
constructor<T extends HitDetail<T>>(): HitList<T>    
addHit(newHit: T): number Add a new hit to the list.  
compare(hit1: undefined | HitDetail, hit2: undefined | HitDetail): | "1" | "-1" compare two hits for insertion into list.  
dropNulls(): void    
empty(): void    
getCurrentHit(): undefined | T    
getHit(hitNum: number): undefined | T Get a hit from a particular index into a HitList  
getNextHit(): undefined | T    
insertHit(i: number, hit: T): void Insert a new hit into the list at the supplied index.  
removeCurrentHit(): void remove the current hit from the list.  
removeHit(hitNum: number): void remove a hit in the list.  
removeHitsFrom(sourceId: string): boolean search through list and remove any hits that contain a specified element id.  
resetCurrentHit(): void    
setCurrentHit(hit: T): void    
setHit(i: number, p: undefined | T): void When setting one or more indices to undefined you must call dropNulls afterwards  

Properties

Name Type Description
currHit number    
hits T[]    
length Accessor ReadOnly number    

Defined in

Last Updated: 12 June, 2024