BinarySearch<P extends GpsPoint, C extends GpsPointsView<P>, F> class

Inheritance
Implementers

Constructors

BinarySearch(C collection, SearchCompareDiff<C, F> compareFunc)

Properties

collection → C
The collection on which the search will be performed.
finalinherited
compareDiff SearchCompareDiff<C, F>
The comparison function that will be used to identify the desired item.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

find(F target, [num? tolerance, int start = 0, int? end]) int?
Tries to find and return the item index between start and end for which the compareDiff returns TimeComparisonResult.same or TimeComparisonResult.overlapping, or that is within tolerance from target. If such an item is not fount, the function null.
inherited
findUnsafe(F target, num? tolerance, int start, int end) int?
Internal implementation for find, which does not do any validity checks on its arguments. Not to be called directly.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited