- All Superinterfaces:
public interface PositionalCondition extends Condition
Based on SAC's
PositionalConditioninterface by Philippe Le Hegaret.
Nested Class Summary
Nested classes/interfaces inherited from interface io.sf.carte.doc.style.css.nsac.Condition
Method SummaryModifier and TypeMethodDescription
An+Bexpression factor (i.e.
An+Bexpression offset (i.e.Get the list of selectors that the children have to match.
booleanThe selector was specified with an argument ?
booleanThe AnB expression is a keyword ?
booleanIs this a forward condition?
isOfType()Is this an of-type selector?
Methods inherited from interface io.sf.carte.doc.style.css.nsac.Condition
isForwardConditionboolean isForwardCondition()Is this a forward condition?
trueif this is a forward condition (like nth-child),
falseif not (like nth-last-child).
isOfTypeboolean isOfType()Is this an of-type selector?
This method only returns
trueif the selector has been explicitly declared to apply to the same type, like in 'first-of-type' or 'nth-of-type'. It should return false otherwise, for example for selectors like the next one despite being equivalent to 'first-of-type':
div:nth-child(1 of div).
This method is essentially the same as the old
PositionalCondition.getType(), but with a more detailed (and potentially different) specification.
trueif this condition has been declared as to be applied to the collection of elements that match the same type as the element to which it is applied (like nth-of-type),
getFactorint getFactor()Get the
An+Bexpression factor (i.e. 'A').
- the An+B expression factor, zero if not specified.
getOffsetint getOffset()Get the
An+Bexpression offset (i.e. 'B').
- the An+B expression offset, or the offset determined from the pseudo-class
name (e.g. 'first-child', 'first-of-type' and 'last-child' all mean
getOfListSelectorList getOfList()Get the list of selectors that the children have to match.
- the list of selectors that the children have to match, or null if not specified.
hasArgumentboolean hasArgument()The selector was specified with an argument ?
This is useful to tell apart
:nth-child(1), for example.
trueif the selector was specified with an argument.
hasKeywordboolean hasKeyword()The AnB expression is a keyword ?
trueif the AnB expression is a keyword like