aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/HasLegacyId.java
blob: a867cb5702f26016895d7f33b6475c780232de23 (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
package at.hannibal2.skyhanni.config;

/**
 * The interface HasLegacyId.
 * To be used for config elements that are being migrated from ArrayLists to Enums.
 * A legacyId is not needed for new elements.
 */
public interface HasLegacyId {

    /**
     * Gets display string.
     *
     * @return the display string
     */
    String toString();

    /**
     * Gets legacy id. This is used for legacy configs that are being migrated to enums.
     * New elements do not need a legacyId, and should return -1
     *
     * @return the legacy id
     */
    default int getLegacyId() {
        return -1;
    }
}