All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cdc.util.enums.DynamicEnumToString Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package cdc.util.enums;

import cdc.util.args.Args;
import cdc.util.args.Factory;
import cdc.util.converters.AbstractConverter;
import cdc.util.converters.Converter;

public class DynamicEnumToString extends AbstractConverter {
    public static final DynamicEnumToString INSTANCE = new DynamicEnumToString();

    public static final Factory FACTORY = Converter.singleton(INSTANCE);

    private DynamicEnumToString() {
        super(DynamicEnum.class,
              String.class);
    }

    @Override
    public String apply(DynamicEnum source) {
        return source == null ? null : source.getQName();
    }

    @Override
    public Args getParams() {
        return Args.NO_ARGS;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy