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

org.neogroup.warp.data.DataObject Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version
package org.neogroup.warp.data;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;

public class DataObject {

    private Map properties;

    public DataObject() {
        properties = new LinkedHashMap<>();
    }

    public DataObject set(String name, Object value) {
        properties.put(name, value);
        return this;
    }

    public  V get(String name) {
        return (V)properties.get(name);
    }

    public boolean has(String key) {
        return properties.containsKey(key);
    }

    public DataObject clear() {
        properties.clear();
        return this;
    }

    public Set properties() {
        return properties.keySet();
    }

    public int size() {
        return properties.size();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy