/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package electrosphere.entity; import java.util.HashMap; import java.util.LinkedList; import java.util.List; /** * * @author amaterasu */ public class Entity { static int entity_id_iterator = 0; int id; HashMap data; LinkedList dataKeys; public int getId() { return id; } // HashMap getData() { // return data; // } public void putData(String key, Object o){ data.put(key,o); dataKeys.add(key); } public List getDataKeys(){ return dataKeys; } public Object getData(String key){ return data.get(key); } public Entity(){ data = new HashMap(); dataKeys = new LinkedList(); id = entity_id_iterator; entity_id_iterator++; } }