java.util.Vector.removeElement()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中java.util.Vector.removeElement()方法的一些代码示例,展示了Vector.removeElement()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vector.removeElement()方法的具体详情如下:
包路径:java.util.Vector
类名称:Vector
方法名:removeElement

Vector.removeElement介绍

[英]Removes the first occurrence, starting at the beginning and moving towards the end, of the specified object from this vector. All elements with an index bigger than the element that gets removed have their index decreased by 1.
[中]从该向量中删除指定对象的第一个引用(从开始到结束)。索引大于被删除元素的所有元素的索引都会减少1。

代码示例

代码示例来源:origin: log4j/log4j

/**
  Remove the appender passed as parameter form the list of attached
  appenders.  */
public
void removeAppender(Appender appender) {
 if(appender == null || appenderList == null) 
  return;
 appenderList.removeElement(appender);    
}

代码示例来源:origin: apache/rocketmq

public void removeAppender(Appender appender) {
  if (appender == null || appenderList == null) {
    return;
  }
  appenderList.removeElement(appender);
}

代码示例来源:origin: plantuml/plantuml

/**
 * Removes the specfied {@link PlotListener}. Does nothing if
 * already removed.
 */
public void removePlotListener(PlotListener listener) {
 _plotListeners.removeElement(listener);
}

代码示例来源:origin: plantuml/plantuml

/** Removes a {@link DataListener}. Does nothing if already removed. */
public void removeDataListener(DataListener listener) {
 _listeners.removeElement(listener);
}

代码示例来源:origin: robovm/robovm

/**
 * Removes the first occurrence, starting at the beginning and moving
 * towards the end, of the specified object from this vector. All elements
 * with an index bigger than the element that gets removed have their index
 * decreased by 1.
 *
 * @param object
 *            the object to remove from this vector.
 * @return {@code true} if the specified object was found, {@code false}
 *         otherwise.
 * @see #removeAllElements
 * @see #removeElementAt
 * @see #size
 */
@Override
public boolean remove(Object object) {
  return removeElement(object);
}

代码示例来源:origin: xalan/xalan

/**
 * Remove a trace listener.
 * @param tl Trace listener to be removed.
 */
public void removeTraceListener(TraceListener tl)
{
 if (null != m_traceListeners)
 {
  m_traceListeners.removeElement(tl);
  
  // The following line added to fix the bug#5140: hasTraceListeners() returns true
  // after adding and removing a listener.
  // Check: if m_traceListeners is empty, then set it to NULL.
  if (0 == m_traceListeners.size()) m_traceListeners = null;
 }
}

代码示例来源:origin: robovm/robovm

/**
 * Removes the specified {@code Certificate} from this {@code Identity}.
 *
 * @param certificate
 *            the {@code Certificate} to be removed.
 * @throws KeyManagementException
 *             if the certificate is not found.
 */
public void removeCertificate(Certificate certificate) throws KeyManagementException {
  if (certificates != null) {
    if (!certificates.contains(certificate)) {
      throw new KeyManagementException("Certificate not found");
    }
    certificates.removeElement(certificate);
  }
}

代码示例来源:origin: igniterealtime/Smack

colors--;
nodes--;
colorList.get(level + 1).removeElement(child);

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Remove a Connection event listener. <p>
 *
 * The default implementation provided here removes this listener
 * from the internal list of ConnectionListeners.
 *
 * @param l         the listener
 * @see             #addConnectionListener
 */
public void removeConnectionListener(ConnectionListener l) {
connectionListeners.removeElement(l);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
  Remove the appender passed as parameter form the list of attached
  appenders.  */
public
void removeAppender(Appender appender) {
 if(appender == null || appenderList == null) 
  return;
 appenderList.removeElement(appender);    
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

/** Removes specified listener from the current set of SplitChangeListeners */
public void removeSplitChangeListener(SplitChangeListener l) {
  if (listeners == null) {
    return;
  }
  listeners.removeElement(l);
}

代码示例来源:origin: com.sun.mail/javax.mail

/**
 * Remove a Connection event listener. <p>
 *
 * The default implementation provided here removes this listener
 * from the internal list of ConnectionListeners.
 *
 * @param l         the listener
 * @see             #addConnectionListener
 */
public void removeConnectionListener(ConnectionListener l) {
connectionListeners.removeElement(l);
}

代码示例来源:origin: apache/log4j

/**
  Remove the appender passed as parameter form the list of attached
  appenders.  */
public
void removeAppender(Appender appender) {
 if(appender == null || appenderList == null) {
   return;
 }
 appenderList.removeElement(appender);    
}

代码示例来源:origin: javahongxi/whatsmars

public void removeAppender(Appender appender) {
  if (appender == null || appenderList == null) {
    return;
  }
  appenderList.removeElement(appender);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Remove a listener for Transport events. <p>
 *
 * The default implementation provided here removes this listener
 * from the internal list of TransportListeners.
 *
 * @param l         the listener
 * @see             #addTransportListener
 */
public synchronized void removeTransportListener(TransportListener l) {
if (transportListeners != null)
  transportListeners.removeElement(l);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Remove a listener for Folder events. <p>
 *
 * The default implementation provided here removes this listener
 * from the internal list of FolderListeners.
 *
 * @param l         the listener
 * @see             #addFolderListener
 */
public synchronized void removeFolderListener(FolderListener l) {
  if (folderListeners != null)
  folderListeners.removeElement(l);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Remove a listener for Store events. <p>
 *
 * The default implementation provided here removes this listener
 * from the internal list of StoreListeners.
 *
 * @param l         the listener
 * @see             #addStoreListener
 */
public synchronized void removeStoreListener(StoreListener l) {
if (storeListeners != null)
  storeListeners.removeElement(l);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Remove a Folder event listener. <p>
 *
 * The implementation provided here removes this listener
 * from the internal list of FolderListeners.
 *
 * @param l     the listener
 * @see        #addFolderListener
 */
public synchronized void removeFolderListener(FolderListener l) {
if (folderListeners != null)
  folderListeners.removeElement(l);
}

代码示例来源:origin: org.apache.ant/ant

} finally {
  if (defaultSetDefined && defaultSet.getDir(getProject()) != null) {
    filesets.removeElement(defaultSet);

代码示例来源:origin: belerweb/pinyin4j

/** remove this attribute if it exists, otherwise silently do nothing. */
public void removeAttribute(String name) {
 if (attributes_ == null) return;
 attributes_.remove(name);
 attributeNames_.removeElement(name);
 notifyObservers();
}

相关文章

微信公众号

最新文章

更多