@Override protected Deque<Value> newValueChain() { return new ArrayDeque<Value>(); }
Mapper(int lsn, List<String> cache) { this.lsn = lsn; this.cache = cache; eventQueue = new ArrayDeque<SilkEvent>(cache.size()); }
Mapper(int lsn, List<String> cache) { this.lsn = lsn; this.cache = cache; eventQueue = new ArrayDeque<SilkEvent>(cache.size()); }
return new Iterator<String>() { ArrayDeque<String> queue = new ArrayDeque<String>();
@Override public void startDocument(XmlPullParser parser) throws XMLException { _nodeStack = new ArrayDeque<Pair<Integer, String>>(); _preOrder = 0; _postOrder = 0; pushStack(); }
@Override public void startDocument(XmlPullParser parser) throws XMLException { // initialize _startOrderStack = new ArrayDeque<Pair<Integer, String>>(); _startOrder = 0; _currentDepth = 0; pushStack(); }
public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException { textStack.addLast(EMPTY_STRING); String tagName = localName; String immediateNodeValue = null; Deque<TreeEvent> startEventQueue = new ArrayDeque<TreeEvent>(atts.getLength()); // read attributes for (int i = 0; i < atts.getLength(); i++) { String attributeName = atts.getQName(i); String attributeValue = atts.getValue(i); // assign the value attribute as a node value of the start tag if (convertValueAttribute && (attributeName.equals("value") || attributeName.equals(String.format( "%s:value", tagName)))) { immediateNodeValue = attributeValue; continue; } startEventQueue.addLast(TreeEvent.newVisitEvent(attributeName, attributeValue)); startEventQueue.addLast(TreeEvent.newLeaveEvent(attributeName)); } // push a new start tag event to the front of the queue startEventQueue.addFirst(TreeEvent.newVisitEvent(tagName, immediateNodeValue)); eventQueue.push(startEventQueue); }
Deque<TreeEvent> subEventQueue = new ArrayDeque<TreeEvent>();
String immediateNodeValue = null; Deque<TreeEvent> startEventQueue = new ArrayDeque<TreeEvent>(pullParser.getAttributeCount() + 1);