|| def == PseudoClassDef.NTH_LAST_OF_TYPE) { try { elementIndex = decodeIndex(args[0]); } catch (NumberFormatException e) {
private PseudoClassImpl(String name, String functionValue, Selector nestedSelector) { this.name = name; type = PseudoClassType.forName(name); this.functionValue = functionValue; this.nestedSelector = nestedSelector; // Type-specific initialization if (type != null) { switch (type) { case NOT: if (nestedSelector == null && functionValue != null) { nestedSelector = new SelectorImpl(); nestedSelector.unlock(); nestedSelector.add(new ElementNameImpl(functionValue)); } break; case NTH_CHILD: case NTH_LAST_CHILD: case NTH_OF_TYPE: case NTH_LAST_OF_TYPE: elementIndex = decodeIndex(functionValue); break; } } }