aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/export/AbstractExport.java
blob: 85b060b9fd1bff4960a0a2f2e89c2293583b7c0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package cgeo.geocaching.export;

import cgeo.geocaching.cgeoapplication;

abstract class AbstractExport implements Export {
    private final String name;

    protected AbstractExport(final String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    /**
     * Generates a localized string from a resource id.
     *
     * @param resourceId
     *            the resource id of the string
     * @return localized string
     */
    protected static String getString(int resourceId) {
        return cgeoapplication.getInstance().getString(resourceId);
    }

    @Override
    public String toString() {
        // used in the array adapter of the dialog showing the exports
        return getName();
    }
}