java.lang.Object
io.sf.carte.doc.style.css.om.SupportsConditionFactory
- All Implemented Interfaces:
BooleanConditionFactory
,SupportsConditionFactory
Contains factory methods related to
@supports
conditions.-
Constructor Summary
ConstructorDescriptionSupportsConditionFactory
(SheetContext parentStyleSheet) Construct a new condition factory for rules belonging to the given style sheet context. -
Method Summary
Modifier and TypeMethodDescriptionCreate a boolean condition of theand
type.createFalseCondition
(String condition) Create a condition that was not recognized by the parser and therefore will never match.Create a boolean condition of thenot
type.Create a boolean condition of the given type (and
,or
,not
).createPredicate
(String featureName) Create a declaration (operand) condition.createSelectorFunction
(SelectorList selectors) Create a selector function.
-
Constructor Details
-
SupportsConditionFactory
Construct a new condition factory for rules belonging to the given style sheet context.- Parameters:
parentStyleSheet
- the style sheet context.
-
-
Method Details
-
createAndCondition
Create a boolean condition of theand
type.- Specified by:
createAndCondition
in interfaceBooleanConditionFactory
- Returns:
- the condition.
-
createOrCondition
Create a boolean condition of the given type (and
,or
,not
).- Specified by:
createOrCondition
in interfaceBooleanConditionFactory
- Returns:
- the condition.
-
createNotCondition
Create a boolean condition of thenot
type.- Specified by:
createNotCondition
in interfaceBooleanConditionFactory
- Returns:
- the condition.
-
createPredicate
Create a declaration (operand) condition.The value of the feature can be set later with
DeclarationPredicate.setValue(LexicalUnit)
.- Specified by:
createPredicate
in interfaceBooleanConditionFactory
- Parameters:
featureName
- the name of the declared feature.- Returns:
- the condition.
-
createSelectorFunction
Create a selector function.- Specified by:
createSelectorFunction
in interfaceSupportsConditionFactory
- Parameters:
selectors
- the selectors.- Returns:
- the condition.
-
createFalseCondition
Description copied from interface:SupportsConditionFactory
Create a condition that was not recognized by the parser and therefore will never match.False conditions belong to the
OTHER
type.- Specified by:
createFalseCondition
in interfaceSupportsConditionFactory
- Parameters:
condition
- the condition that was not recognized.- Returns:
- a condition that never matches.
-