code: @Override
      public Set<Node> check(Set<Node> nodes, Node root) throws NodeSelectorException {
          Assert.notNull(nodes, "nodes is null!");
          this.nodes = nodes;
          result = new LinkedHashSet<Node>();
          String value = specifier.getValue();
          if ("nth-child".equals(value)) {
              addNthChild();
          } else if ("nth-last-child".equals(value)) {
              addNthLastChild();
          } else if ("nth-of-type".equals(value)) {
              addNthOfType();
          } else if ("nth-last-of-type".equals(value)) {
              addNthLastOfType();
          } else {
              throw new NodeSelectorException("Unknown pseudo nth class: " + value);
          }
          
          return result;
      }
docs: {@inheritDoc}