gps_queries library Null safety

The GPS Queries library provides facilities to query GPS points.

Classes

BinarySearch<P extends GpsPoint, C extends GpsPointsView<P>, F>
BinarySearchInGpcEfficient<P extends GpsPoint, F>
BinarySearchInSlowCollection<P extends GpsPoint, F>
CollectionInfo
Query result for QueryCollectionInfo.
CollectionItems<C extends GpsPointsView<GpsPoint>>
Query result for QueryCollectionItems.
LinearSearch<P extends GpsPoint, C extends GpsPointsView<P>, F>
LinearSearchInGpcEfficient<P extends GpsPoint, F>
LinearSearchInSlowCollection<P extends GpsPoint, F>
LocationByTime<P extends GpsPoint>
Query result for QueryLocationByTime.
Query<C extends GpsPointsView<GpsPoint>, R extends QueryResult>
Abstract generic ancestor class for queries parametrized for collection type C and result type R.
QueryCollectionInfo<C extends GpsPointsView<GpsPoint>>
Queries generic information about the collection and returns it as result of CollectionInfo type.
QueryCollectionItems<C extends GpsPointsView<GpsPoint>>
Returns specified item range from the collection and as result of CollectionItems type.
QueryLocationByTime<C extends GpsPointsView<P>, P extends GpsPoint>
Finds the location at a specific time if available, or the nearest within a specified tolerance, returning it as a result of LocationByTime type.
QueryResult
Abstract ancestor class for query results.
SearchAlgorithm<P extends GpsPoint, C extends GpsPointsView<P>, F>
Abstract class representing a search algorithm looking for entities of type P in a collection of type C. The entity of type P will be identified based on find-target data of type F.
SearchCompareDiff<C extends GpsPointsView<GpsPoint>, F>
Container for a compareFunc and a diffFunc to be passed around to search algorithms.

Functions

compareItemToTime(GpsPointsView<GpsPoint> collection, int itemNr, GpsTime time) int
Compares an item at a specific position in collection to a given time, returning -1 if the item in the collection is before time, 0 if they're the same or overlapping, and 1 if the item in the collection is after time.
diffItemAndTime(GpsPointsView<GpsPoint> collection, int itemNr, GpsTime time) num

Typedefs

CompareItemToTargetFunc<C extends GpsPointsView<GpsPoint>, F> = int Function(C collection, int itemNr, F findTarget)
Function to compare item itemNr of collection to findTarget and return a result, like Comparator.
DiffBetween<C extends GpsPointsView<GpsPoint>, F> = num Function(C collection, int itemNr, F findTarget)
Function to calculate the difference between item itemNr of collection and findTarget.