/** Returns true if an asset with the specified name and type is loading, queued to be loaded, or has been loaded. */ public synchronized boolean contains (String fileName, Class type) { if (tasks.size() > 0) { AssetDescriptor assetDesc = tasks.firstElement().assetDesc; if (assetDesc.type == type && assetDesc.fileName.equals(fileName)) return true; } for (int i = 0; i < loadQueue.size; i++) { AssetDescriptor assetDesc = loadQueue.get(i); if (assetDesc.type == type && assetDesc.fileName.equals(fileName)) return true; } return isLoaded(fileName, type); }
/** Returns true if an asset with the specified name is loading, queued to be loaded, or has been loaded. */ public synchronized boolean contains (String fileName) { if (tasks.size() > 0 && tasks.firstElement().assetDesc.fileName.equals(fileName)) return true; for (int i = 0; i < loadQueue.size; i++) if (loadQueue.get(i).fileName.equals(fileName)) return true; return isLoaded(fileName); }
/** Returns true if an asset with the specified name is loading, queued to be loaded, or has been loaded. */ public synchronized boolean contains (String fileName) { if (tasks.size() > 0 && tasks.firstElement().assetDesc.fileName.equals(fileName)) return true; for (int i = 0; i < loadQueue.size; i++) if (loadQueue.get(i).fileName.equals(fileName)) return true; return isLoaded(fileName); }
/** Returns true if an asset with the specified name and type is loading, queued to be loaded, or has been loaded. */ public synchronized boolean contains (String fileName, Class type) { if (tasks.size() > 0) { AssetDescriptor assetDesc = tasks.firstElement().assetDesc; if (assetDesc.type == type && assetDesc.fileName.equals(fileName)) return true; } for (int i = 0; i < loadQueue.size; i++) { AssetDescriptor assetDesc = loadQueue.get(i); if (assetDesc.type == type && assetDesc.fileName.equals(fileName)) return true; } return isLoaded(fileName, type); }
AssetLoadingTask currAsset = tasks.firstElement(); if (currAsset.assetDesc.fileName.equals(fileName)) { currAsset.cancel = true;
AssetLoadingTask currAsset = tasks.firstElement(); if (currAsset.assetDesc.fileName.equals(fileName)) { currAsset.cancel = true;
public void setThenSaxEventList(List<SaxEvent> thenSaxEventList) { IfState state = stack.firstElement(); if(state.active) { state.thenSaxEventList = thenSaxEventList; } else { throw new IllegalStateException("setThenSaxEventList() invoked on inactive IfAction"); } }
public void setElseSaxEventList(List<SaxEvent> elseSaxEventList) { IfState state = stack.firstElement(); if(state.active) { state.elseSaxEventList = elseSaxEventList; } else { throw new IllegalStateException("setElseSaxEventList() invoked on inactive IfAction"); } }
protected boolean stream(ElementHandler handler) { // create an xpath context from the root element // TODO: cache the context, should work just the same // JXPathIntrospector.registerDynamicClass(ElementHandlerImpl.class, // ElementHandlerPropertyHandler.class); JXPathIntrospector.registerDynamicClass(NodeImpl.class, NodePropertyHandler.class); // ElementHandler rootHandler = // ((DocumentHandler) handlers.firstElement()).getDocumentElementHandler(); Node root = ((DocumentHandler) handlers.firstElement()).getParseNode(); JXPathContext jxpContext = JXPathContextFactory.newInstance().newContext(null, root); jxpContext.setLenient(true); Iterator itr = jxpContext.iterate(xpath); while (itr.hasNext()) { Object obj = itr.next(); if (handler.getParseNode().equals(obj)) { return true; } } return false; } }
nodeStack.firstElement().addElement(element); } else { Node parent = null; peek = nodeStack.get(index); } else { parent = nodeStack.firstElement();
/** * @return the main printer. */ public WikiPrinter getMainPrinter() { return this.printers.firstElement(); }
public void setElseSaxEventList(List<SaxEvent> elseSaxEventList) { IfState state = stack.firstElement(); if(state.active) { state.elseSaxEventList = elseSaxEventList; } else { throw new IllegalStateException("setElseSaxEventList() invoked on inactive IfAction"); } }
public void setThenSaxEventList(List<SaxEvent> thenSaxEventList) { IfState state = stack.firstElement(); if(state.active) { state.thenSaxEventList = thenSaxEventList; } else { throw new IllegalStateException("setThenSaxEventList() invoked on inactive IfAction"); } }
public static ITypeInfo getQualifyingEnclosingTypeInfo( Stack<IFeatureInfo> enclosingFeatureInfos ) { if( enclosingFeatureInfos.empty() ) { return null; } else { return (ITypeInfo)enclosingFeatureInfos.firstElement(); } }
public void setThenSaxEventList(List<SaxEvent> thenSaxEventList) { IfState state = stack.firstElement(); if(state.active) { state.thenSaxEventList = thenSaxEventList; } else { throw new IllegalStateException("setThenSaxEventList() invoked on inactive IfAction"); } }
public void setElseSaxEventList(List<SaxEvent> elseSaxEventList) { IfState state = stack.firstElement(); if(state.active) { state.elseSaxEventList = elseSaxEventList; } else { throw new IllegalStateException("setElseSaxEventList() invoked on inactive IfAction"); } }
public void setThenSaxEventList(List<SaxEvent> thenSaxEventList) { IfState state = stack.firstElement(); if (state.active) { state.thenSaxEventList = thenSaxEventList; } else { throw new IllegalStateException("setThenSaxEventList() invoked on inactive IfAction"); } }
public void setElseSaxEventList(List<SaxEvent> elseSaxEventList) { IfState state = stack.firstElement(); if (state.active) { state.elseSaxEventList = elseSaxEventList; } else { throw new IllegalStateException("setElseSaxEventList() invoked on inactive IfAction"); } }
/** Returns true if an asset with the specified name is loading, queued to be loaded, or has been loaded. */ public synchronized boolean contains (String fileName) { if (tasks.size() > 0 && tasks.firstElement().assetDesc.fileName.equals(fileName)) return true; for (int i = 0; i < loadQueue.size; i++) if (loadQueue.get(i).fileName.equals(fileName)) return true; return isLoaded(fileName); }
/** Returns true if an asset with the specified name and type is loading, queued to be loaded, or has been loaded. */ public synchronized boolean contains (String fileName, Class type) { if (tasks.size() > 0) { AssetDescriptor assetDesc = tasks.firstElement().assetDesc; if (assetDesc.type == type && assetDesc.fileName.equals(fileName)) return true; } for (int i = 0; i < loadQueue.size; i++) { AssetDescriptor assetDesc = loadQueue.get(i); if (assetDesc.type == type && assetDesc.fileName.equals(fileName)) return true; } return isLoaded(fileName, type); }