1 19 20 package org.netbeans.modules.search; 21 22 import java.util.List ; 23 import org.netbeans.modules.search.types.TextDetail; 24 25 29 final class Item { 30 31 32 private final ResultModel resultModel; 33 34 final MatchingObject matchingObj; 35 36 final int detailIndex; 37 38 40 Item(ResultModel resultModel, MatchingObject matchingObj, int detailIndex) { 41 this.resultModel = resultModel; 42 this.matchingObj = matchingObj; 43 this.detailIndex = detailIndex; 44 } 45 46 48 TextDetail getLocation() { 49 if (detailIndex == -1) { 50 return null; 51 } 52 53 List <TextDetail> textDetails 54 = resultModel.fullTextSearchType.getTextDetails(matchingObj.object); 55 return detailIndex < textDetails.size() 56 ? textDetails.get(detailIndex) 57 : null; 58 } 59 60 } 61 | Popular Tags |