public UUID getUuid(Entity e) { UUID uuid = entityToUuid.safeGet(e.getId()); if (uuid == null) { uuid = UUID.randomUUID(); setUuid(e, uuid); } return uuid; }
public UUID getUuid(Entity e) { UUID uuid = entityToUuid.safeGet(e.getId()); if (uuid == null) { uuid = UUID.randomUUID(); setUuid(e, uuid); } return uuid; }
private TransmuteOperation operation(int entityId, int compositionId) { TransmuteOperation operation = operations.safeGet(compositionId); if (operation == null) { operation = factory.createOperation(entityId); operations.set(compositionId, operation); } return operation; }
private TransmuteOperation operation(int entityId, int compositionId) { TransmuteOperation operation = operations.safeGet(compositionId); if (operation == null) { operation = factory.createOperation(entityId); operations.set(compositionId, operation); } return operation; }
public void setUuid(Entity e, UUID newUuid) { UUID oldUuid = entityToUuid.safeGet(e.getId()); if (oldUuid != null) uuidToEntity.remove(oldUuid); uuidToEntity.put(newUuid, e); entityToUuid.set(e.getId(), newUuid); } }
public void setUuid(Entity e, UUID newUuid) { UUID oldUuid = entityToUuid.safeGet(e.getId()); if (oldUuid != null) uuidToEntity.remove(oldUuid); uuidToEntity.put(newUuid, e); entityToUuid.set(e.getId(), newUuid); } }
@Override public void deleted(Entity e) { UUID uuid = entityToUuid.safeGet(e.getId()); if (uuid == null) return; Entity oldEntity = uuidToEntity.get(uuid); if (oldEntity != null && oldEntity.equals(e)) uuidToEntity.remove(uuid); entityToUuid.set(e.getId(), null); }
@Override public void deleted(Entity e) { UUID uuid = entityToUuid.safeGet(e.getId()); if (uuid == null) return; Entity oldEntity = uuidToEntity.get(uuid); if (oldEntity != null && oldEntity.equals(e)) uuidToEntity.remove(uuid); entityToUuid.set(e.getId(), null); }
E getE(int entityId) { E e = (E) es.safeGet(entityId); if ( e == null ) { e = new E().init(this,entityId); es.set(entityId, e); }; return e; } }
E getE(int entityId) { E e = (E) es.safeGet(entityId); if ( e == null ) { e = new E().init(this,entityId); es.set(entityId, e); }; return e; } }