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

net.sf.andromedaioc.model.beans.MapModel Maven / Gradle / Ivy

The newest version!
package net.sf.andromedaioc.model.beans;

import net.sf.andromedaioc.model.builder.xml.XmlContextElement;

import java.util.List;

public class MapModel extends AbstractDataStructureModel {

    private List entries;

    private Class keyType;

    private Class valueType;

    public MapModel(XmlContextElement xmlType) {
        super(xmlType);
        if(!xmlType.isMap()) {
            throw new IllegalArgumentException(String.format("Cannot create collection model. Reason: %s is not map descriptor", xmlType));
        }
        super.setBeanClass(xmlType.getDefaultType());
    }

    public List getEntries() {
        return entries;
    }

    public void setEntries(List entries) {
        this.entries = entries;
    }

    public Class getKeyType() {
        return keyType;
    }

    public void setKeyType(Class keyType) {
        this.keyType = keyType;
    }

    public Class getValueType() {
        return valueType;
    }

    public void setValueType(Class valueType) {
        this.valueType = valueType;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy