aboutsummaryrefslogtreecommitdiffstats
path: root/config-lib/src/main/java/com/yahoo/config/EnumNode.java
blob: 5427e6dc057ddbfd6f68a798b81a5228f8160ce6 (plain) (blame)
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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config;

/**
 * The EnumNode class is a superclass for Enumerations in a configuration tree.
 */
public abstract class EnumNode<ENUM extends Enum<?>> extends LeafNode<ENUM> {

    public EnumNode() {
    }

    public EnumNode(boolean b) {
        super(b);
    }

    @Override
    public String toString() {
        return (value == null) ? "(null)" : value.toString();
    }

    @Override
    public String getValue() {
        return (value == null) ? null : value.toString();
    }
}