Esempio n. 1
0
  private Selector replaceLeadingAppendersByEmptiness(Selector selector) {
    while (!selector.isEmpty() && selector.getHead().isAppender()) {
      selector.getHead().setParent(null);
      selector.removeHead();
    }

    if (selector.isEmpty()) {
      SimpleSelector empty = createEmptySimpleSelector(selector);
      selector.addPart(empty);
    }
    return selector;
  }
Esempio n. 2
0
  private Selector chopOffHead(Selector selector) {
    if (!selector.isCombined()) return null;

    selector.removeHead();
    return selector;
  }