public boolean hasIllegalTechLevels(StringBuffer buff, boolean ignoreAmmo) { boolean retVal = false; int eTechLevel = getEntity().getTechLevel(); for(Enumeration e = getEntity().getEquipment(); e.hasMoreElements(); ) { EquipmentType nextE = ((Mounted)e.nextElement()).getType(); if ((ignoreAmmo) && (nextE instanceof AmmoType)) { continue; } else if (!(TechConstants.isLegal(eTechLevel, nextE.getTechLevel(), true))) { if (!retVal) buff.append("Equipment illegal at unit's tech level:\n"); retVal = true; buff.append(nextE.getName()).append("\n"); } } return retVal;
public boolean hasIllegalTechLevels(StringBuffer buff) { return hasIllegalTechLevels(buff, true);
    public boolean hasIllegalTechLevels(StringBuffer buff, boolean ignoreAmmo)    {        boolean retVal = false;        int eTechLevel = getEntity().getTechLevel();        for(Enumeration e = getEntity().getEquipment();                e.hasMoreElements(); )        {            EquipmentType nextE = ((Mounted)e.nextElement()).getType();            if ((ignoreAmmo) && (nextE instanceof AmmoType)) {                continue;            } else if (!(TechConstants.isLegal(eTechLevel, nextE.getTechLevel(), true))) {                if (!retVal)                    buff.append("Equipment illegal at unit's tech level:\n");                retVal = true;                buff.append(nextE.getName()).append("\n");            }        }        return retVal;    }