code: @Override
  	public Collection<Node> check(final Collection<Node> nodes) {
  		Assert.notNull(nodes, "nodes is null!");
  		this.nodes = nodes;
  
  		this.result = new LinkedHashSet<Node>();
  
  		String value = specifier.getValue();
  		if ("empty".equals(value))
  			addEmptyElements();
  		else if ("first-child".equals(value))
  			addFirstChildElements();
  		else if ("first-of-type".equals(value))
  			addFirstOfType();
  		else if ("last-child".equals(value))
  			addLastChildElements();
  		else if ("last-of-type".equals(value))
  			addLastOfType();
  		else if ("only-child".equals(value))
  			addOnlyChildElements();
  		else if ("only-of-type".equals(value))
  			addOnlyOfTypeElements();
  		else if ("root".equals(value))
  			addRootElement();
  		else
  			throw new RuntimeException("Unknown pseudo class: " + value);
  
  		return result;
  	}
docs: {@inheritDoc}