@Test(expected = IllegalArgumentException.class) public void testAddTwice() { Engine engine = new Engine(new EngineConfig()); Mapper<TagA> mFlagA = engine.getMapper(TagA.class); int entity = engine.createEntity(); mFlagA.create(entity); mFlagA.create(entity); }
public abstract T create(int entity);
Mapper { public abstract T create(int entity); }
Mapper { public abstract T create(int entity); protected  Mapper(Engine engine, Class<T> type, int typeIndex); }
Mapper { public abstract T create(int entity); protected  Mapper(Engine engine, Class<T> type, int typeIndex); abstract T create(int entity); abstract T get(int entity); final boolean has(int entity); final void remove(int entity); @SuppressWarnings("unchecked") final ComponentState<T> getState(); }
Mapper { public abstract T create(int entity); protected  Mapper(Engine engine, Class<T> type, int typeIndex); abstract T create(int entity); abstract T get(int entity); final boolean has(int entity); final void remove(int entity); @SuppressWarnings("unchecked") final ComponentState<T> getState();  }