congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CompositeCollection.contains
Code IndexAdd Tabnine to your IDE (free)

How to use
contains
method
in
org.apache.commons.collections.collection.CompositeCollection

Best Java code snippets using org.apache.commons.collections.collection.CompositeCollection.contains (Showing top 14 results out of 315)

origin: commons-collections/commons-collections

/**
 * Checks whether this composite contains all the elements in the specified collection.
 * <p>
 * This implementation calls <code>contains()</code> for each element in the
 * specified collection.
 *
 * @param coll  the collection to check for
 * @return true if all elements contained
 */
public boolean containsAll(Collection coll) {
  for (Iterator it = coll.iterator(); it.hasNext();) {
    if (this.contains(it.next()) == false) {
      return false;
    }
  }
  return true;
}

origin: wildfly/wildfly

/**
 * Checks whether this composite contains all the elements in the specified collection.
 * <p>
 * This implementation calls <code>contains()</code> for each element in the
 * specified collection.
 *
 * @param coll  the collection to check for
 * @return true if all elements contained
 */
public boolean containsAll(Collection coll) {
  for (Iterator it = coll.iterator(); it.hasNext();) {
    if (this.contains(it.next()) == false) {
      return false;
    }
  }
  return true;
}

origin: commons-collections/commons-collections

public void testRetainAll() {
  setUpTest();
  one.add("1");
  one.add("2");
  two.add("1");
  c.addComposited(one);
  c.retainAll(two);
  assertTrue(!c.contains("2"));
  assertTrue(!one.contains("2"));
  assertTrue(c.contains("1"));
  assertTrue(one.contains("1"));
}

origin: commons-collections/commons-collections

public void testRemoveAll() {
  setUpMutatorTest();
  one.add("1");
  two.add("2");
  two.add("1");
  c.addComposited(one, two);
  c.removeAll(one);
  assertTrue(!c.contains("1"));
  assertTrue(!one.contains("1"));
  assertTrue(!two.contains("1"));
}

origin: commons-collections/commons-collections

public void testRemove() {
  setUpMutatorTest();
  one.add("1");
  two.add("2");
  two.add("1");
  c.addComposited(one, two);
  c.remove("1");
  assertTrue(!c.contains("1"));
  assertTrue(!one.contains("1"));
  assertTrue(!two.contains("1"));
}

origin: commons-collections/commons-collections

public void testIterator() {
  setUpTest();
  one.add("1");
  two.add("2");
  c.addComposited(one);
  c.addComposited(two);
  Iterator i = c.iterator();
  Object next = i.next();
  assertTrue(c.contains(next));
  assertTrue(one.contains(next));
  next = i.next();
  i.remove();
  assertTrue(!c.contains(next));
  assertTrue(!two.contains(next));
}

origin: commons-collections/commons-collections

  public void testRemoveComposited() {
    setUpMutatorTest();
    one.add("1");
    two.add("2");
    two.add("1");
    c.addComposited(one, two);    
    c.removeComposited(one);
    assertTrue(c.contains("1"));
    assertEquals(c.size(), 2);
  }
}
origin: commons-collections/commons-collections

two.add("foo");
c.addAll(two);
assertTrue(c.contains("foo"));
assertTrue(one.contains("foo"));
origin: commons-collections/commons-collections

assertTrue(c.contains("foo"));
assertTrue(one.contains("foo"));
origin: com.alibaba.citrus.tool/antx-autoexpand

/**
 * Checks whether this composite contains all the elements in the specified collection.
 * <p>
 * This implementation calls <code>contains()</code> for each element in the
 * specified collection.
 *
 * @param coll  the collection to check for
 * @return true if all elements contained
 */
public boolean containsAll(Collection coll) {
  for (Iterator it = coll.iterator(); it.hasNext();) {
    if (this.contains(it.next()) == false) {
      return false;
    }
  }
  return true;
}
 
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-collections

/**
 * Checks whether this composite contains all the elements in the specified collection.
 * <p>
 * This implementation calls <code>contains()</code> for each element in the
 * specified collection.
 *
 * @param coll  the collection to check for
 * @return true if all elements contained
 */
public boolean containsAll(Collection coll) {
  for (Iterator it = coll.iterator(); it.hasNext();) {
    if (this.contains(it.next()) == false) {
      return false;
    }
  }
  return true;
}
 
origin: org.apache.directory.api/api-ldap-client-all

/**
 * Checks whether this composite contains all the elements in the specified collection.
 * <p>
 * This implementation calls <code>contains()</code> for each element in the
 * specified collection.
 *
 * @param coll  the collection to check for
 * @return true if all elements contained
 */
public boolean containsAll(Collection coll) {
  for (Iterator it = coll.iterator(); it.hasNext();) {
    if (this.contains(it.next()) == false) {
      return false;
    }
  }
  return true;
}

origin: org.apache.openjpa/openjpa-all

/**
 * Checks whether this composite contains all the elements in the specified collection.
 * <p>
 * This implementation calls <code>contains()</code> for each element in the
 * specified collection.
 *
 * @param coll  the collection to check for
 * @return true if all elements contained
 */
public boolean containsAll(Collection coll) {
  for (Iterator it = coll.iterator(); it.hasNext();) {
    if (this.contains(it.next()) == false) {
      return false;
    }
  }
  return true;
}

origin: org.jboss.eap/wildfly-client-all

/**
 * Checks whether this composite contains all the elements in the specified collection.
 * <p>
 * This implementation calls <code>contains()</code> for each element in the
 * specified collection.
 *
 * @param coll  the collection to check for
 * @return true if all elements contained
 */
public boolean containsAll(Collection coll) {
  for (Iterator it = coll.iterator(); it.hasNext();) {
    if (this.contains(it.next()) == false) {
      return false;
    }
  }
  return true;
}

org.apache.commons.collections.collectionCompositeCollectioncontains

Javadoc

Checks whether this composite collection contains the object.

This implementation calls contains() on each collection.

Popular methods of CompositeCollection

  • <init>
    Create a CompositeCollection with colls as the initial list of composited collections.
  • addComposited
    Add these Collections to the list of collections in this composite
  • iterator
    Gets an iterator over all the collections in this composite. This implementation uses an IteratorCha
  • setMutator
    Specify a CollectionMutator strategy instance to handle changes.
  • size
    Gets the size of this composite collection. This implementation calls size() on each collection.
  • add
    Adds an object to the collection, throwing UnsupportedOperationException unless a CollectionMutator
  • addAll
    Adds a collection of elements to this collection, throwing UnsupportedOperationException unless a Co
  • clear
    Removes all of the elements from this collection . This implementation calls clear() on each collect
  • containsAll
    Checks whether this composite contains all the elements in the specified collection. This implementa
  • isEmpty
    Checks whether this composite collection is empty. This implementation calls isEmpty() on each colle
  • remove
    Removes an object from the collection, throwing UnsupportedOperationException unless a CollectionMut
  • removeAll
    Removes the elements in the specified collection from this composite collection. This implementatio
  • remove,
  • removeAll,
  • removeComposited,
  • retainAll,
  • toCollection

Popular in Java

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now