API Reference 0.7.1rikulo_view_selectSelector

Selector class

class Selector {
 
 final int selectorIndex;
 final List<SimpleSelectorSequence> seqs;
 
 Selector(this.selectorIndex) : seqs = new List<SimpleSelectorSequence>();
 
 void addCombinator(Token token) {
   seqs.last.setCombinatorByToken(token);
 }
 
 int getCombinator(int index) => seqs[index].combinator;
 
 bool requiresIDSpace(int index) => seqs[index].id != null;
 
 SimpleSelectorSequence addSequence() {
   SimpleSelectorSequence seq = new SimpleSelectorSequence();
   seqs.add(seq);
   return seq;
 }
 
 String toString() {
   StringBuffer sb = new StringBuffer();
   for (SimpleSelectorSequence seq in seqs)
     sb.write("$seq${seq.printCombinator()} ");
   return sb.toString().trim();
 }
 
}

Constructors

new Selector(int selectorIndex) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
Selector(this.selectorIndex) : seqs = new List<SimpleSelectorSequence>();

Properties

final int selectorIndex #

final int selectorIndex

final List<SimpleSelectorSequence> seqs #

final List<SimpleSelectorSequence> seqs

Methods

void addCombinator(Token token) #

void addCombinator(Token token) {
 seqs.last.setCombinatorByToken(token);
}

SimpleSelectorSequence addSequence() #

SimpleSelectorSequence addSequence() {
 SimpleSelectorSequence seq = new SimpleSelectorSequence();
 seqs.add(seq);
 return seq;
}

int getCombinator(int index) #

int getCombinator(int index) => seqs[index].combinator;

bool requiresIDSpace(int index) #

bool requiresIDSpace(int index) => seqs[index].id != null;

String toString() #

Returns a string representation of this object.

docs inherited from Object
String toString() {
 StringBuffer sb = new StringBuffer();
 for (SimpleSelectorSequence seq in seqs)
   sb.write("$seq${seq.printCombinator()} ");
 return sb.toString().trim();
}