Class MapCSSStyleIndex
java.lang.Object
org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleIndex
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final MapCSSRuleIndexrules to apply canvas properties(package private) final MapCSSRuleIndexRules for multipolygon relations(package private) final MapCSSRuleIndexRules for nodes(package private) final MapCSSRuleIndexRules for relations that are not multipolygon relations(package private) final MapCSSRuleIndexRules for ways with tag area=no(package private) final MapCSSRuleIndexRules for ways without tag area=no -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildIndex(Stream<MapCSSRule> ruleStream) Builds and initializes the index.voidclear()Clear the index.get(IPrimitive p) Get the index of rules for the given primitive.Get a subset of all rules that might match the primitive.private voidbooleanisEmpty()Check if this index is empty.
-
Field Details
-
nodeRules
Rules for nodes -
wayRules
Rules for ways without tag area=no -
wayNoAreaRules
Rules for ways with tag area=no -
relationRules
Rules for relations that are not multipolygon relations -
multipolygonRules
Rules for multipolygon relations -
canvasRules
rules to apply canvas properties
-
-
Constructor Details
-
MapCSSStyleIndex
public MapCSSStyleIndex()
-
-
Method Details
-
clear
Clear the index.You must own the write lock STYLE_SOURCE_LOCK when calling this method.
-
buildIndex
Builds and initializes the index.You must own the write lock of STYLE_SOURCE_LOCK when calling this method.
- Parameters:
ruleStream- the rules to index
-
initIndex
-
get
Get the index of rules for the given primitive.- Parameters:
p- the primitive- Returns:
- index of rules for the given primitive
-
getRuleCandidates
Get a subset of all rules that might match the primitive. Rules not included in the result are guaranteed to not match this primitive.You must have a read lock of STYLE_SOURCE_LOCK when calling this method.
- Parameters:
osm- the primitive to match- Returns:
- An iterator over possible rules in the right order.
-
isEmpty
Check if this index is empty.- Returns:
- true if this index is empty.
- Since:
- 16784
-