Class MekSearchFilter
java.lang.Object
megamek.client.ui.dialogs.advancedsearch.MekSearchFilter
Class to perform filtering on units. This class stores a list of constraints and for a given
MekSummary it
can tell whether that MekSummary meets the constraints or not.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintbooleanintintintintintint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateFilterExpressionFromTokens(List<FilterToken> filterTokens) Creates an ExpressionTree from a collection of tokens.booleanEvaluates the given list of equipment names and quantities against the expression tree in this filter.static booleanisMatch(MekSummary mek, MekSearchFilter f)
-
Field Details
-
sStartWalk
-
sEndWalk
-
sStartJump
-
sEndJump
-
iArmor
public int iArmor -
iOmni
public int iOmni -
iMilitary
public int iMilitary -
iIndustrial
public int iIndustrial -
iFrankenMek
public int iFrankenMek -
iMountedInfantry
public int iMountedInfantry -
iWaterOnly
public int iWaterOnly -
iDoomedOnGround
public int iDoomedOnGround -
iDoomedInAtmosphere
public int iDoomedInAtmosphere -
iDoomedInSpace
public int iDoomedInSpace -
iDoomedInExtremeTemp
public int iDoomedInExtremeTemp -
iDoomedInVacuum
public int iDoomedInVacuum -
iSupportVehicle
public int iSupportVehicle -
iAerospaceFighter
public int iAerospaceFighter -
sStartTankTurrets
-
sEndTankTurrets
-
sStartLowerArms
-
sEndLowerArms
-
sStartHands
-
sEndHands
-
iClanEngine
public int iClanEngine -
iOfficial
public int iOfficial -
iCanon
public int iCanon -
iPatchwork
public int iPatchwork -
source
-
rulesRefs
-
mulID
-
iInvalid
public int iInvalid -
iFailedToLoadEquipment
public int iFailedToLoadEquipment -
sStartTroopSpace
-
sEndTroopSpace
-
sStartASFBays
-
sEndASFBays
-
sStartASFDoors
-
sEndASFDoors
-
sStartASFUnits
-
sEndASFUnits
-
sStartSmallCraftBays
-
sEndSmallCraftBays
-
sStartSmallCraftDoors
-
sEndSmallCraftDoors
-
sStartSmallCraftUnits
-
sEndSmallCraftUnits
-
sStartMekBays
-
sEndMekBays
-
sStartMekDoors
-
sEndMekDoors
-
sStartMekUnits
-
sEndMekUnits
-
sStartHeavyVehicleBays
-
sEndHeavyVehicleBays
-
sStartHeavyVehicleDoors
-
sEndHeavyVehicleDoors
-
sStartHeavyVehicleUnits
-
sEndHeavyVehicleUnits
-
sStartLightVehicleBays
-
sEndLightVehicleBays
-
sStartLightVehicleDoors
-
sEndLightVehicleDoors
-
sStartLightVehicleUnits
-
sEndLightVehicleUnits
-
sStartProtomekBays
-
sEndProtomekBays
-
sStartProtomekDoors
-
sEndProtomekDoors
-
sStartProtomekUnits
-
sEndProtomekUnits
-
sStartBattleArmorBays
-
sEndBattleArmorBays
-
sStartBattleArmorDoors
-
sEndBattleArmorDoors
-
sStartBattleArmorUnits
-
sEndBattleArmorUnits
-
sStartInfantryBays
-
sEndInfantryBays
-
sStartInfantryDoors
-
sEndInfantryDoors
-
sStartInfantryUnits
-
sEndInfantryUnits
-
sStartSuperHeavyVehicleBays
-
sEndSuperHeavyVehicleBays
-
sStartSuperHeavyVehicleDoors
-
sEndSuperHeavyVehicleDoors
-
sStartSuperHeavyVehicleUnits
-
sEndSuperHeavyVehicleUnits
-
sStartDropShuttleBays
-
sEndDropShuttleBays
-
sStartDropShuttleDoors
-
sEndDropShuttleDoors
-
sStartDropShuttleUnits
-
sEndDropShuttleUnits
-
sStartDockingCollars
-
sEndDockingCollars
-
sStartBattleArmorHandles
-
sEndBattleArmorHandles
-
sStartCargoBayUnits
-
sEndCargoBayUnits
-
sStartYear
-
sEndYear
-
sStartTons
-
sEndTons
-
sStartBV
-
sEndBV
-
isDisabled
public boolean isDisabled -
engineType
-
engineTypeExclude
-
gyroType
-
gyroTypeExclude
-
armorType
-
armorTypeExclude
-
internalsType
-
internalsTypeExclude
-
moveModes
-
moveModeExclude
-
cockpitType
-
cockpitTypeExclude
-
techLevel
-
techLevelExclude
-
techBase
-
techBaseExclude
-
quirkInclude
public int quirkInclude -
quirkExclude
public int quirkExclude -
quirkType
-
quirkTypeExclude
-
weaponQuirkInclude
public int weaponQuirkInclude -
weaponQuirkExclude
public int weaponQuirkExclude -
weaponQuirkType
-
weaponQuirkTypeExclude
-
checkEquipment
public boolean checkEquipment -
filterMek
public int filterMek -
filterBipedMek
public int filterBipedMek -
filterProtomek
public int filterProtomek -
filterLAM
public int filterLAM -
filterTripod
public int filterTripod -
filterQuad
public int filterQuad -
filterQuadVee
public int filterQuadVee -
filterAero
public int filterAero -
filterFixedWingSupport
public int filterFixedWingSupport -
filterConvFighter
public int filterConvFighter -
filterSmallCraft
public int filterSmallCraft -
filterDropship
public int filterDropship -
filterJumpship
public int filterJumpship -
filterWarship
public int filterWarship -
filterSpaceStation
public int filterSpaceStation -
filterInfantry
public int filterInfantry -
filterBattleArmor
public int filterBattleArmor -
filterTank
public int filterTank -
filterVTOL
public int filterVTOL -
filterSupportVTOL
public int filterSupportVTOL -
filterGunEmplacement
public int filterGunEmplacement -
filterSupportTank
public int filterSupportTank -
filterLargeSupportTank
public int filterLargeSupportTank -
filterSuperHeavyTank
public int filterSuperHeavyTank -
equipmentCriteria
-
-
Constructor Details
-
MekSearchFilter
public MekSearchFilter() -
MekSearchFilter
Deep copy constructor. New instantiations of all state variables are created.- Parameters:
mekSearchFilter- TheMekSearchFilterto create a copy of.
-
-
Method Details
-
createFilterExpressionFromTokens
public void createFilterExpressionFromTokens(List<FilterToken> filterTokens) throws FilterParsingException Creates an ExpressionTree from a collection of tokens.- Throws:
FilterParsingException
-
getEquipmentExpression
-
isMatch
-
evaluate
Evaluates the given list of equipment names and quantities against the expression tree in this filter.- Parameters:
eq- Collection of equipment namesqty- The number of each piece of equipment- Returns:
- True if the provided lists satisfy the expression tree
-