public void add(MoveMap rhs) { if(!idKeySet.containsAll(rhs.idKeySet) || !rhs.idKeySet.containsAll(idKeySet)) { throw new VoldemortException("MoveMap objects cannot be added! They have incompatible id sets (" + idKeySet + " vs. " + rhs.idKeySet + ")."); } for(Integer fromId: idKeySet) { for(Integer toId: idKeySet) { int moves = get(fromId, toId) + rhs.get(fromId, toId); fromToMoves.get(fromId).put(toId, moves); } } }
checkAllItem.setOnMenuItemClickListener(menuItem -> { boolean changed = false; if (mCurrentTags.containsAll(mTagsArrayAdapter.mTagsList)) { mCurrentTags.removeAll(mTagsArrayAdapter.mTagsList); changed = true;
@Override public boolean containsAll(Collection<?> collection) { return this.treeSet.containsAll(collection); }
@Override public boolean containsAll(Collection<?> c) { return container.containsAll(c); }
/** * Determines whether this effective node type representation includes * (either through inheritance or aggregation) all of the given node types. * * @param nodeTypeNames array of node type names * @return <code>true</code> if all of the given node types are included, * otherwise <code>false</code> */ public boolean includesNodeTypes(Name[] nodeTypeNames) { return allNodeTypes.containsAll(Arrays.asList(nodeTypeNames)); }
/** * Determines whether this effective node type representation includes * (either through inheritance or aggregation) all of the given node types. * * @param nodeTypeNames array of node type names * @return <code>true</code> if all of the given node types are included, * otherwise <code>false</code> */ public boolean includesNodeTypes(Name[] nodeTypeNames) { return allNodeTypes.containsAll(Arrays.asList(nodeTypeNames)); }
public boolean includesNodeTypes(Name[] nodeTypeNames) { return allNodeTypes.containsAll(Arrays.asList(nodeTypeNames)); }
/** * Check if two networks are equal. * @param networkA A network. * @param networkB Another network. * @return If they are equal. */ public static boolean areNetworksEqual(Network networkA, Network networkB) { return networkA.elements.containsAll(networkB.elements) && networkA.elements.size() == networkB.elements.size(); }
public boolean includesNodeTypes(Name[] nodeTypeNames) { return allNodeTypes.containsAll(Arrays.asList(nodeTypeNames)); }
private static boolean predecessorsCovered(GeoElementND ps2n, TreeSet<GeoElement> ancestors) { return ancestors.containsAll( getAllIndependentPredecessors(ps2n.toGeoElement())); } }
/** * Accessor for whether a collection is contained in this Set. * @param c The collection * @return Whether it is contained. **/ public synchronized boolean containsAll(java.util.Collection c) { if (useCache) { loadFromStore(); } else if (backingStore != null) { java.util.TreeSet tree = new java.util.TreeSet(c); Iterator iter=iterator(); while (iter.hasNext()) { tree.remove(iter.next()); } return tree.isEmpty(); } return delegate.containsAll(c); }
@Override public boolean containsAll(Collection c) { if (!_directAccess && isDelayLoad()) { load(); } return super.containsAll(c); }
@Override public boolean containsAll(Collection c) { if (!_directAccess && isDelayLoad()) { load(); } return super.containsAll(c); }
@Override public boolean containsAll(Collection c) { if (!_directAccess && isDelayLoad()) { load(); } return super.containsAll(c); }
/** * Accessor for whether a collection is contained in this Set. * @param c The collection * @return Whether it is contained. **/ public synchronized boolean containsAll(java.util.Collection c) { if (useCache) { loadFromStore(); } else if (backingStore != null) { java.util.SortedSet sorted = new java.util.TreeSet(c); Iterator iter=iterator(); while (iter.hasNext()) { sorted.remove(iter.next()); } return sorted.isEmpty(); } return delegate.containsAll(c); }
@Override public boolean containsAll(Collection c) { if (!_directAccess && isDelayLoad()) { load(); } return super.containsAll(c); }
/** * A User is considered consistent if the User's set of identities are a superset * of this Users set of identities. * * @param superset * @return true if the user is consistent, false otherwise */ public boolean isConsistent(final User superset) { if (superset == null) { return false; } if (this.identities.size() == 0 || superset.identities.size() == 0) { return false; } PrincipalComparator p = new PrincipalComparator(); TreeSet<Principal> set1 = new TreeSet<Principal>(p); TreeSet<Principal> set2 = new TreeSet<Principal>(p); set1.addAll(superset.getIdentities()); set2.addAll(this.getIdentities()); return set1.containsAll(set2); }
implies = httpMethods.containsAll(perm.httpMethods);
if (_memberSet.containsAll(set2)) { return true;
@Test public void testSupportedSpatialOperators() throws Exception { Document doc = getAsDOM("wfs?service=WFS&request=getCapabilities&version=1.0.0"); Element spatialOperators = getFirstElementByTagName(doc, "ogc:Spatial_Operators"); NodeList ops = spatialOperators.getChildNodes(); TreeSet<String> o = new TreeSet<String>(); for (int i = 0; i < ops.getLength(); i++) { String operator = ops.item(i).getLocalName(); o.add(operator); } List<String> expectedSpatialOperators = getSupportedSpatialOperatorsList(true); assertEquals(expectedSpatialOperators.size(), o.size()); assertTrue(o.containsAll(expectedSpatialOperators)); }