Subversion Repositories eFlore/Applications.coel

Rev

Blame | Last modification | View Log | RSS feed

package org.tela_botanica.client.modeles;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import com.extjs.gxt.ui.client.data.ModelData;

public class SimpleModelData implements ModelData {
        
        private Map<String, Object> modele = new HashMap<String, Object>();
        
        public SimpleModelData(String cle, String valeur, String ordre) {
                this.set("cle", cle);
                this.set("valeur", valeur);
                this.set("ordre", ordre);
        }
        
        public String getValeur() {
                return (String)modele.get("valeur");
        }
        
        public String getCle() {
                return (String)modele.get("cle");
        }
        
        public String getOrdre() {
                return (String)modele.get("ordre");
        }

        @Override
        public String get(String property) {
                return (String)modele.get(property);
        }

        @Override
        public Map<String, Object> getProperties() {
                return modele;
        }

        @Override
        public Collection<String> getPropertyNames() {
                return modele.keySet();
        }

        @Override
        public String remove(String property) {
                return (String)modele.remove(property);
        }

        @Override
        public <Object> Object set(String property, Object value) {
                modele.put(property, value);
                return value;
        }

}