Refine search
/** * remove a runtime configurable wrapper from the stack */ public void popWrapper() { if (wStack.size() > 0) { wStack.removeElementAt(wStack.size() - 1); } }
public void removeAppender(String name) { if (name == null || appenderList == null) { return; } int size = appenderList.size(); for (int i = 0; i < size; i++) { if (name.equals((appenderList.elementAt(i)).getName())) { appenderList.removeElementAt(i); break; } } }
/** * Removes a {@link DataElement} at the specified index. * After the element has been successfully removed * all {@link DataListener DataListeners} will be informed. * @param index Index of the element which will be removed. * All elements with an index > <tt>index</tt> will be shifted. */ public void removeElementAt(int index) { DataElement element = (DataElement) _container.elementAt(index); element.setContainer(null); _container.removeElementAt(index); notifyListeners(DataEvent.createRemoveEvent(this, index, element)); }
/** Remove the appender with the name passed as parameter form the list of appenders. */ public void removeAppender(String name) { if(name == null || appenderList == null) return; int size = appenderList.size(); for(int i = 0; i < size; i++) { if(name.equals(((Appender)appenderList.elementAt(i)).getName())) { appenderList.removeElementAt(i); break; } } }
PSQLState.INVALID_CURSOR_STATE); if (rows.size() == 0) int numKeys = primaryKeys.size(); if ( deleteStatement == null ) rows.removeElementAt(current_row); current_row--; moveToCurrentRow();
@Override protected void trimEdits(int from, int to) { if (from <= to) { for (int i = to; from <= i; i--) { UndoableEdit e = edits.elementAt(i); e.die(); edits.removeElementAt(i); } if (indexOfNextAdd > to) { indexOfNextAdd -= to-from+1; } else if (indexOfNextAdd >= from) { indexOfNextAdd = from; } } }
/** JJK: Support <?xalan:doc_cache_off?> kluge in ElemForEach. * TODO: This function is highly dangerous. Cache management must be improved. * * @param n The node to remove. */ public void removeDocumentFromCache(int n) { if(DTM.NULL ==n) return; for(int i=m_sourceTree.size()-1;i>=0;--i) { SourceTree st=(SourceTree)m_sourceTree.elementAt(i); if(st!=null && st.m_root==n) { m_sourceTree.removeElementAt(i); return; } } }
@Override public boolean addEdit(UndoableEdit anEdit) { boolean retVal; // Trim from the indexOfNextAdd to the end, as we'll // never reach these edits once the new one is added. trimEdits(indexOfNextAdd, edits.size()-1); if (!inProgress) { retVal = false; } else { UndoableEdit last = lastEdit(); if (last == null) { edits.addElement(anEdit); } else if (!last.addEdit(anEdit)) { if (anEdit.replaceEdit(last)) { edits.removeElementAt(edits.size() - 1); } edits.addElement(anEdit); } retVal = true; } // Maybe super added this edit, maybe it didn't (perhaps // an in progress compound edit took it instead. Or perhaps // this UndoManager is no longer in progress). So make sure // the indexOfNextAdd is pointed at the right place. indexOfNextAdd = edits.size(); // Enforce the limit trimForLimit(); return retVal; }
/** * Remove the part at specified location (starting from 0). * Shifts all the parts after the removed part down one. * * @param index Index of the part to remove * @exception IndexOutOfBoundsException if the given index * is out of range. * @exception IllegalWriteException if the underlying * implementation does not support modification * of existing values * @exception MessagingException for other failures */ public synchronized void removeBodyPart(int index) throws MessagingException { if (parts == null) throw new IndexOutOfBoundsException("No such BodyPart"); BodyPart part = (BodyPart)parts.elementAt(index); parts.removeElementAt(index); part.setParent(null); }
/** JJK: Support <?xalan:doc_cache_off?> kluge in ElemForEach. * TODO: This function is highly dangerous. Cache management must be improved. * * @param n The node to remove. */ public void removeDocumentFromCache(int n) { if(DTM.NULL ==n) return; for(int i=m_sourceTree.size()-1;i>=0;--i) { SourceTree st=(SourceTree)m_sourceTree.elementAt(i); if(st!=null && st.m_root==n) { m_sourceTree.removeElementAt(i); return; } } }
for (int i = 0; i < matches.size(); ) { boolean amb = false; PointMatch m = matches.get(i); float[] m_p2 = m.getP2().getL(); for (int j = i + 1; j < matches.size(); ) { PointMatch n = matches.get(j); float[] n_p2 = n.getP2().getL(); amb = true; matches.removeElementAt(j); } else ++j; matches.removeElementAt(i); } else ++i;
/** * Remove the part at specified location (starting from 0). * Shifts all the parts after the removed part down one. * * @param index Index of the part to remove * @exception IndexOutOfBoundsException if the given index * is out of range. * @exception IllegalWriteException if the underlying * implementation does not support modification * of existing values * @exception MessagingException for other failures */ public synchronized void removeBodyPart(int index) throws MessagingException { if (parts == null) throw new IndexOutOfBoundsException("No such BodyPart"); BodyPart part = parts.elementAt(index); parts.removeElementAt(index); part.setParent(null); }
/** * @param con * * @throws SQLException */ public synchronized void releaseConnectionOnError( Connection con )throws SQLException { // find the PooledConnection Object for ( int x = 0; x < m_pool.size(); x++ ) { PooledConnection pcon = (PooledConnection) m_pool.elementAt(x); // Check for correct Connection if ( pcon.getConnection() == con ) { if (DEBUG) { System.out.println("Releasing Connection On Error" + x); } con.close(); m_pool.removeElementAt(x); if (DEBUG) { System.out.println("-->Inactive Pool, Closing connection"); } break; } } }
for (int i = 0; i < matches.size(); ) { boolean amb = false; PointMatch m = matches.get(i); float[] m_p2 = m.getP2().getL(); for (int j = i + 1; j < matches.size(); ) { PointMatch n = matches.get(j); float[] n_p2 = n.getP2().getL(); amb = true; matches.removeElementAt(j); } else ++j; matches.removeElementAt(i); } else ++i;
if (!completeQueue.isEmpty()) { token = (MqttToken) completeQueue.elementAt(0); completeQueue.removeElementAt(0); message = (MqttPublish) messageQueue.elementAt(0); messageQueue.removeElementAt(0);
/** Release the underlying ServerMonitor thread, and drop the connections to all connected remote servers. */ public void cleanUp() { // stop the monitor thread LogLog.debug("stopping ServerSocket"); serverMonitor.stopMonitor(); serverMonitor = null; // close all of the connections LogLog.debug("closing client connections"); while (oosList.size() != 0) { ObjectOutputStream oos = (ObjectOutputStream)oosList.elementAt(0); if(oos != null) { try { oos.close(); } catch(InterruptedIOException e) { Thread.currentThread().interrupt(); LogLog.error("could not close oos.", e); } catch(IOException e) { LogLog.error("could not close oos.", e); } oosList.removeElementAt(0); } } }
(pendingFlows.isEmpty() || !((MqttWireMessage)pendingFlows.elementAt(0) instanceof MqttConnect))) { result = (MqttWireMessage)pendingMessages.elementAt(0); pendingMessages.removeElementAt(0); actualInFlight++;
int size = stack.size(); if (size > 0) { String t = (String)stack.elementAt(size - 1); stack.removeElementAt(size - 1); return t;
/** * Get the next asset from the queue, increment the index * @return The next available asset (the asset is removed from the queue) */ private synchronized org.osid.repository.Asset getAsset() { org.osid.repository.Asset asset = (org.osid.repository.Asset) assetVector.elementAt(0); assetVector.removeElementAt(0); index++; return asset; }
Vector<String> rendList = PlugInManager.getPlugInList(null, null, plType); int listSize = rendList.size(); boolean found = false; String rname; rname = rendList.elementAt(i); if (rname.equals(dar)) { // DAR is in the registry found = true; rendList.removeElementAt(i); break;