X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fdata%2FFileInfo.java;h=ffcc95b04bcd2a5e7b34bb5fe0ad73eb973eac7b;hp=1fd56b94b76aca28739c809bb11f3f78d48ce77f;hb=a6197ddcaac11c0b943183da7d46169742d024af;hpb=88f2c3647ed9e055090484f01a959d4581f85e7d diff --git a/tim/prune/data/FileInfo.java b/tim/prune/data/FileInfo.java index 1fd56b9..ffcc95b 100644 --- a/tim/prune/data/FileInfo.java +++ b/tim/prune/data/FileInfo.java @@ -81,6 +81,21 @@ public class FileInfo return _sources.get(inIndex); } + /** + * Get the SourceInfo object (if any) for the given point + * @param inPoint point object + * @return SourceInfo object if there is one, otherwise null + */ + public SourceInfo getSourceForPoint(DataPoint inPoint) + { + for (SourceInfo source : _sources) { + if (source.getIndex(inPoint) >= 0) { + return source; + } + } + return null; + } + /** * Clone contents of file info */