com.vaadin.sass.internal.selector
Class SimpleSelectorSequence
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<SimpleSelector>
com.vaadin.sass.internal.selector.SimpleSelectorSequence
- All Implemented Interfaces:
- SelectorSegment, Serializable, Cloneable, Iterable<SimpleSelector>, Collection<SimpleSelector>, List<SimpleSelector>, RandomAccess
public class SimpleSelectorSequence
- extends ArrayList<SimpleSelector>
- implements SelectorSegment
- See Also:
- Serialized Form
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
SimpleSelectorSequence
public SimpleSelectorSequence()
SimpleSelectorSequence
public SimpleSelectorSequence(Collection<SimpleSelector> seq)
SimpleSelectorSequence
public SimpleSelectorSequence(SimpleSelectorSequence prior,
SimpleSelector simpleSelector)
SimpleSelectorSequence
public SimpleSelectorSequence(SimpleSelector simpleSelector,
SimpleSelectorSequence tail)
difference
public SimpleSelectorSequence difference(SimpleSelectorSequence that)
- Returns this \ that, set-theoretically
union
public SimpleSelectorSequence union(SimpleSelectorSequence that)
- Returns this followed by all elements in that but not in this
unify
public SimpleSelectorSequence unify(SimpleSelectorSequence extend,
SimpleSelectorSequence extending)
- Tries to unify this with the "extending" simple selector sequence by
extend. The simple selector sequence extend is a unifier only if it
subsumes (is more general than) this selector. The result is this
selector minus simple selectors in extend plus simple selectors in
extending.
Example:
this = a.foo.bar, extend = a.foo, extending = b.baz result = b.bar.baz
Note: if extend lacks a type selector, this and extending must share the
same type selector.
getTypeSelector
public TypeSelector getTypeSelector()
getNonTypeSelectors
public SimpleSelectorSequence getNonTypeSelectors()
subsumes
public boolean subsumes(SimpleSelectorSequence that)
- Returns whether this simple selector sequence matches (at least) all
elements that simple selector sequence matches. True if the simple
selectors in this is a subset of those in that. If type selector is
universal in this, compare other kinds of simple selectors only.
replaceVariable
public SimpleSelectorSequence replaceVariable(VariableNode var)
toString
public String toString()
- Overrides:
toString in class AbstractCollection<SimpleSelector>
withoutTypeSelector
public SimpleSelectorSequence withoutTypeSelector()
- Returns the same sequence, but without type selector if one was present.
isPlaceholder
public boolean isPlaceholder()
- Returns whether this selector contains a placeholder (%-selector)
Copyright © 2013–2014 Vaadin. All rights reserved.