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

com.draagon.meta.attr.StringAttribute Maven / Gradle / Ivy

/*
 * Copyright 2002 Draagon Software LLC. All Rights Reserved.
 *
 * This software is the proprietary information of Draagon Software LLC.
 * Use is subject to license terms.
 */
package com.draagon.meta.attr;

/**
 * An attribute of a MetaClass, MetaField, or MetaView
 */
@SuppressWarnings("serial")
public class StringAttribute extends MetaAttribute {
    //private static Log log = LogFactory.getLog( StringAttribute.class );

    private String mString = null;

    /**
     * Constructs the MetaClass
     */
    public StringAttribute(String name) {
        super(name);
    }

    public StringAttribute(String name, String value) {
        super(name);
        setValue(value);
    }

    /**
     * Sets the value of the MetaAttribute
     */
    @Override
    public void setValue(String value) {
        mString = value.toString();
    }

    /**
     * Returns the value of the MetaAttribute
     */
    @Override
    public String getValue() {
        return mString;
    }

    @Override
    public void setValueAsString(String value) {
        setValue(value);
    }

    @Override
    public String getValueAsString() {
        return getValue();
    }

    public Object clone() {
        StringAttribute sa = (StringAttribute) super.clone();
        sa.mString = mString;
        return sa;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy