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

org.nakedobjects.metamodel.facets.SingleStringValueFacetAbstract Maven / Gradle / Ivy

There is a newer version: 4.0-beta-1
Show newest version
package org.nakedobjects.metamodel.facets;


public abstract class SingleStringValueFacetAbstract extends FacetAbstract implements SingleStringValueFacet {
    private final String value;

    public SingleStringValueFacetAbstract(final Class facetType, final FacetHolder holder, final String value) {
        super(facetType, holder, false);
        this.value = value;
    }

    public String value() {
        return value;
    }

    @Override
    protected String toStringValues() {
        if (value == null) {
            return "null";
        } else {
            return "\"" + value + "\"";
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy