if (entity.getWeight() <= Entity.WEIGHT_LIGHT) {
if (entity.getWeightClass() == EntityWeightClass.WEIGHT_LIGHT) {
    public MechEntry genericFor(Entity entity) {        if (entity.entityIsQuad()) {            return default_quad;        }        if (entity instanceof Tank) {            return default_tank;        }        if (entity instanceof Infantry) {            return default_inf;        }        if (entity instanceof Protomech) {            return default_proto;        }        // mech, by weight        if (entity.getWeight() <= Entity.WEIGHT_LIGHT) {            return default_light;        } else if (entity.getWeight() <= Entity.WEIGHT_MEDIUM) {            return default_medium;        } else if (entity.getWeight() <= Entity.WEIGHT_HEAVY) {            return default_heavy;        } else if (entity.getWeight() <= Entity.WEIGHT_ASSAULT) {            return default_assault;        }                //TODO: better exception?        throw new IndexOutOfBoundsException("can't find an image for that mech"); //$NON-NLS-1$    }