Here is my code:
for (DrawableEntity entity : drawableEntityList) { if (entity instanceof Beam) { (Beam) entity.age += timeElapsed; ...