
com.artemis.component.PooledCollections Maven / Gradle / Ivy
package com.artemis.component;
import com.artemis.Component;
import com.artemis.annotations.PooledWeaver;
import com.artemis.utils.Bag;
import com.artemis.utils.IntBag;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ObjectMap;
import java.util.*;
@PooledWeaver
public class PooledCollections extends Component {
public Array array = new Array();
public Bag bag = new Bag();
public ArrayList arrayList = new ArrayList();
public HashMap hashMap = new HashMap();
public HashSet hashSet = new HashSet();
public IntBag intBag = new IntBag();
public List list = new ArrayList();
public Map map = new HashMap();
public ObjectMap objectMap = new ObjectMap();
public void setAll() {
array.add("array");
bag.add("bag");
hashSet.add("hashSet");
arrayList.add("arrayList");
list.add("list");
hashMap.put("key", "map");
intBag.add(1);
map.put("lock", "unlocked");
objectMap.put("obj", "map");
}
public void clearAll() {
array.clear();
bag.clear();
hashSet.clear();
arrayList.clear();
list.clear();
hashMap.clear();
intBag.clear();
map.clear();
objectMap.clear();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy