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

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

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

Vector.removeAll介绍

[英]Removes all occurrences in this vector of each object in the specified Collection.
[中]删除指定集合中每个对象在此向量中的所有引用。

代码示例

代码示例来源:origin: net.jxta/jxta-jxse

/**
 * remove a list of EndpointAddresses from the access point
 *
 * @param addresses List of EndpointAddresses represented as
 *                  {@link java.lang.String}.
 */
public void removeEndpointAddresses(List<String> addresses) {
  endpointAddresses.removeAll(addresses);
}

代码示例来源:origin: net.sourceforge/javaml

/**
 * Remove the instances in q from sp
 * 
 * @param sp
 * @param q
 */
private void removeInstances(Vector<TaggedInstance> sp, Vector<TaggedInstance> q) {
  sp.removeAll(q);
}

代码示例来源:origin: org.jboss.cache/jbosscache-core

protected void removeBuddies(Collection<Address> buddies)
{
 this.buddies.removeAll(buddies);
 lastModified = new Date();
}

代码示例来源:origin: egineering-llc/collectd-fast-jmx

public void removeConnectionNotificationListener(NotificationListener listener) throws ListenerNotFoundException {
  List<NotificationDef> toRemove = new ArrayList<NotificationDef>();
  synchronized (listeners) {
    for (NotificationDef def : listeners) {
      if (def.listener == listener) {
        toRemove.add(def);
      }
    }
    listeners.removeAll(toRemove);
  }
}

代码示例来源:origin: org.glassfish.main.ejb/ejb-container

private Collection getTransactionMethodsFor(Class interfaceImpl, Collection disallowedMethods) {
  Vector v = new Vector(Arrays.asList(interfaceImpl.getMethods()));
  v.removeAll(disallowedMethods);
  return v;
}

代码示例来源:origin: org.glassfish.ejb/ejb-container

private Collection getTransactionMethodsFor(Class interfaceImpl, Collection disallowedMethods) {
  Vector v = new Vector(Arrays.asList(interfaceImpl.getMethods()));
  v.removeAll(disallowedMethods);
  return v;
}

代码示例来源:origin: stackoverflow.com

public static void main(String[] args) {
  Vector v1 = new Vector();
  Vector v2 = new Vector();

  v1.add(1111);
  v2.add(1111);
  v2.add(2222);

  v2.removeAll(v1);
  System.out.println(v2);

}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * First wait until complete.
 */
public synchronized boolean removeAll(Collection collection) {
  waitUntilComplete();
  return super.removeAll(collection);
}

代码示例来源:origin: org.rosuda.REngine/REngine

public boolean removeAll(Collection c) {
if (names==null) return super.removeAll(c);
boolean changed=false;
Iterator it = c.iterator();
while (it.hasNext())
  changed|=remove(it.next());
return changed;
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

@Override
public synchronized boolean removeAll(Collection paramCollection) {
  if (_directAccess) {
    return super.removeAll(paramCollection);
  }
  return ProxyCollections.removeAll(this, paramCollection);
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * First wait until complete.
 */
public synchronized boolean removeAll(Collection collection) {
  waitUntilComplete();
  return super.removeAll(collection);
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

@Override
public synchronized boolean removeAll(Collection paramCollection) {
  if (_directAccess) {
    return super.removeAll(paramCollection);
  }
  return ProxyCollections.removeAll(this, paramCollection);
}

代码示例来源:origin: org.apache.openjpa/openjpa-kernel

@Override
public synchronized boolean removeAll(Collection paramCollection) {
  if (_directAccess) {
    return super.removeAll(paramCollection);
  }
  return ProxyCollections.removeAll(this, paramCollection);
}

代码示例来源:origin: com.jidesoft/jide-oss

@Override
public synchronized boolean removeAll(Collection<?> c) {
  uncacheAll();
  return super.removeAll(c);
}

代码示例来源:origin: net.rforge/REngine

public boolean removeAll(Collection c) {
if (names==null) return super.removeAll(c);
boolean changed=false;
Iterator it = c.iterator();
while (it.hasNext())
  changed|=remove(it.next());
return changed;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * First wait until complete.
 */
public synchronized boolean removeAll(Collection collection) {
  waitUntilComplete();
  return super.removeAll(collection);
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel

@Override
public synchronized boolean removeAll(Collection paramCollection) {
  if (_directAccess) {
    return super.removeAll(paramCollection);
  }
  return ProxyCollections.removeAll(this, paramCollection);
}

代码示例来源:origin: toplink.essentials/toplink-essentials

/**
 * First wait until complete.
 */
public synchronized boolean removeAll(Collection collection) {
  waitUntilComplete();
  return super.removeAll(collection);
}

代码示例来源:origin: net.sf.jdos/jdos-sm

@Override
public void remove(Service service) {
  Vector<Service> toRemove=new Vector<Service>();
  for (Service serv:services)
    if (serv.getID().equalsIgnoreCase(service.getID()))
      toRemove.add(service);
  services.removeAll(toRemove);
}

代码示例来源:origin: octo-online/reactive-audit

@Test(expected = ReactiveAuditException.class)
public void removeAll()
{
  ReactiveAudit.off.commit();
  Vector vector=new Vector();
  TestTools.strict.commit();
  vector.removeAll(null);
}
@Test(expected = ReactiveAuditException.class)

相关文章