~veger/ganttproject/manual-import

« back to all changes in this revision

Viewing changes to ganttproject/src/net/sourceforge/ganttproject/search/SearchResult.java

  • Committer: Maarten Bezemer
  • Date: 2012-01-22 12:20:00 UTC
  • Revision ID: maarten.bezemer@gmail.com-20120122122000-qwyec45rjx86wi7o
Updated till 2fe683a778c3 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
GanttProject is an opensource project management tool. License: GPL2
 
2
GanttProject is an opensource project management tool. License: GPL3
3
3
Copyright (C) 2011 Dmitry Barashev
4
4
 
5
5
This program is free software; you can redistribute it and/or
6
6
modify it under the terms of the GNU General Public License
7
 
as published by the Free Software Foundation; either version 2
 
7
as published by the Free Software Foundation; either version 3
8
8
of the License, or (at your option) any later version.
9
9
 
10
10
This program is distributed in the hope that it will be useful,
18
18
*/
19
19
package net.sourceforge.ganttproject.search;
20
20
 
21
 
public class SearchResult {
 
21
public class SearchResult<SearchObjectType> {
22
22
    private final String myOrigin;
23
23
    private final String mySnippet;
24
24
    private final String myLabel;
25
25
    private final SearchService mySearchService;
 
26
    private final SearchObjectType mySearchObject;
26
27
 
27
 
    public SearchResult(String label, String snippet, String origin, SearchService service) {
 
28
    public SearchResult(String label, String snippet, String origin, SearchObjectType searchObject, SearchService service) {
28
29
        myLabel = label;
29
30
        mySnippet = snippet;
30
31
        myOrigin = origin;
31
32
        mySearchService = service;
 
33
        mySearchObject = searchObject;
32
34
    }
33
35
 
34
36
    public String getLabel() {
43
45
        return myOrigin;
44
46
    }
45
47
 
 
48
    public SearchObjectType getObject() {
 
49
        return mySearchObject;
 
50
    }
 
51
 
46
52
    @Override
47
53
    public String toString() {
48
54
        return myLabel;