Package megamek.client.ratgenerator
Class TOCNode
java.lang.Object
megamek.client.ratgenerator.RulesetNode
megamek.client.ratgenerator.TOCNode
Contains details about which units and echelon levels are available to this unit in given eras.
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class megamek.client.ratgenerator.RulesetNode
assertions, name, predicates -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TOCNodecreateFromXml(Node node) booleanisEmpty()Whether this table of contents offers anything.protected voidloadFromXml(Node node) booleanoffersUnitTypes(String faction, int year) Whether these menus offer a faction any unit type in a year.Methods inherited from class megamek.client.ratgenerator.RulesetNode
apply, collectionMatchesProperty, getName, matches, matches, matches, matchesDate, matchesPredicate, setName
-
Field Details
-
unitTypeNodes
-
echelonNodes
-
ratingNodes
-
flagNodes
-
-
Constructor Details
-
TOCNode
protected TOCNode()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Whether this table of contents offers anything. A ruleset file with no<toc>still gets an empty one, which means "use the parent's", not "offer nothing".- Returns:
truewhen there is no unit type, echelon, rating or flag option at all
-
offersUnitTypes
Whether these menus offer a faction any unit type in a year. The Force Generator leaves out a faction they do not, since it could only show empty menus.- Parameters:
faction- the faction keyyear- the year- Returns:
truewhen at least one unit type option applies
-
findUnitTypes
-
findEchelons
-
findRatings
-
findFlags
-
createFromXml
-
loadFromXml
- Overrides:
loadFromXmlin classRulesetNode
-