1/*
2 *****************************************************************************
3 * Copyright (C) 2000-2004, International Business Machines Corporation and  *
4 * others. All Rights Reserved.                                              *
5 *****************************************************************************
6 */
7package com.ibm.rbm;
8
9
10import java.util.*;
11
12/**
13 * This class represents the results found for each resource key while
14 * performing the code scan done by RBReporter.
15 *
16 * @author Jared Jackson
17 * @see com.ibm.rbm.RBReporter
18 */
19public class ScanResult {
20    BundleItem item;
21    Vector occurances;
22
23    ScanResult(BundleItem item) {
24        this.item = item;
25        occurances = new Vector();
26    }
27
28    BundleItem getItem() {
29        return item;
30    }
31
32    int getNumberOccurances() {
33        return occurances.size();
34    }
35
36    Vector getOccurances() {
37        return occurances;
38    }
39
40    void addOccurance(Occurance o) {
41        occurances.addElement(o);
42    }
43
44    String getName() {
45        return item.getKey();
46    }
47
48    String getGroupName() {
49        if (item.getParentGroup() != null) return item.getParentGroup().getName();
50        return "Unknown";
51    }
52}