diff --git a/src/com/massivecraft/mcore5/store/Coll.java b/src/com/massivecraft/mcore5/store/Coll.java index 5310ceb3..023d61f3 100644 --- a/src/com/massivecraft/mcore5/store/Coll.java +++ b/src/com/massivecraft/mcore5/store/Coll.java @@ -70,7 +70,7 @@ public class Coll> implements CollInterface ids = Collections.newSetFromMap(new ConcurrentHashMap()); + protected Set ids = new ConcurrentSkipListSet(); @Override public Collection getIds() { return Collections.unmodifiableCollection(this.ids); } @Override public Collection getIdsRemote() { return this.getDb().getDriver().getIds(this); } @Override public boolean containsEntity(Object entity) { return this.entities.contains(entity); }; @@ -252,28 +252,17 @@ public class Coll> implements CollInterface> // -------------------------------------------- // public L attach(E entity); public L attach(E entity, Object oid); - public E detach(Object o); + public E detachEntity(Object entity); + public E detachId(Object oid); // -------------------------------------------- // // IDENTIFIED CHANGES diff --git a/src/com/massivecraft/mcore5/store/Entity.java b/src/com/massivecraft/mcore5/store/Entity.java index 59762d48..7c61ba77 100644 --- a/src/com/massivecraft/mcore5/store/Entity.java +++ b/src/com/massivecraft/mcore5/store/Entity.java @@ -10,7 +10,7 @@ import com.massivecraft.mcore5.xlib.gson.Gson; * Entity class. It just contains a set of shortcut methods. */ -// Self referencing generic using the "getThis trick". +// Self referencing generic. // http://www.angelikalanger.com/GenericsFAQ/FAQSections/ProgrammingIdioms.html#FAQ206 public abstract class Entity, L extends Comparable> implements Comparable { @@ -37,7 +37,7 @@ public abstract class Entity, L extends Comparable coll = this.getColl(); if (coll == null) return null; - return coll.detach(this); + return coll.detachEntity(this); } public boolean attached()