public boolean containsAll(Collection<?> c) { return delegate.containsAll(c); }
public boolean containsAll(Collection coll) { List searchColl = new ArrayList(); Iterator it = coll.iterator(); while (it.hasNext()) { Object feature = it.next(); if (feature instanceof PreGeneralizedSimpleFeature) searchColl.add(((PreGeneralizedSimpleFeature) feature).feature); else searchColl.add(feature); } return backendCollection.containsAll(searchColl); }
assertTrue(features.containsAll(otherHalf)); assertTrue(!features.containsAll(half)); collection.removeAll(otherHalf); assertTrue(features.size() == 0); collection.addAll(half); assertTrue(features.containsAll(half)); collection.addAll(otherHalf); assertTrue(features.containsAll(otherHalf)); collection.retainAll(otherHalf); assertTrue(features.containsAll(otherHalf)); assertTrue(!features.containsAll(half)); collection.addAll(otherHalf); Iterator<SimpleFeature> i = collection.iterator();
public boolean containsAll(Collection c) { return delegate.containsAll(c); }
public boolean containsAll(Collection coll) { List searchColl = new ArrayList(); Iterator it = coll.iterator(); while (it.hasNext()) { Object feature = it.next(); if (feature instanceof PreGeneralizedSimpleFeature) searchColl.add(((PreGeneralizedSimpleFeature) feature).feature); else searchColl.add(feature); } return backendCollection.containsAll(searchColl); }
public void testAddRemoveAllAbilities() throws Exception { Collection half = randomPiece(features); Collection otherHalf = DataUtilities.list(features); otherHalf.removeAll(half); features.removeAll(half); assertTrue(features.containsAll(otherHalf)); assertTrue(!features.containsAll(half)); features.removeAll(otherHalf); assertTrue(features.size() == 0); features.addAll(half); assertTrue(features.containsAll(half)); features.addAll(otherHalf); assertTrue(features.containsAll(otherHalf)); features.retainAll(otherHalf); assertTrue(features.containsAll(otherHalf)); assertTrue(!features.containsAll(half)); features.addAll(otherHalf); Iterator i = features.iterator(); while (i.hasNext()) { i.next(); i.remove(); } assertEquals(features.size(), 0); SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder(); tb.setName("XXX"); SimpleFeatureBuilder b = new SimpleFeatureBuilder(tb.buildFeatureType()); assertTrue(!features.remove(b.buildFeature(null))); }