Code example for LinkedList

Methods: getLast, isEmpty, removeLast

0
            } 
 
            @Override 
            public void endElement(String uri, String elementName, String qName) throws SAXException {
                handlerStack.removeLast().finish(context);
                elementNameStack.removeLast();
                context.setElementName(elementNameStack.isEmpty() ? null : elementNameStack.getLast());
            } 
        }); 
        saxParser.getXMLReader().parse(new InputSource(input));
    } 
 
    private static String normalise(String value) {
        if (value == null) {
            return null; 
        } 
        String normalised = value.trim();
        if (normalised.isEmpty()) {
            return null; 
        } 
        return normalised;