Package java.util

Examples of java.util.Set.containsAll()


     */
    public void testKeySetToArray() {
        COWMap map = map5();
        Set s = map.keySet();
        Object[] ar = s.toArray();
        assertTrue(s.containsAll(Arrays.asList(ar)));
        assertEquals(5, ar.length);
        ar[0] = m10;
        assertFalse(s.containsAll(Arrays.asList(ar)));
    }

View Full Code Here


        Set s = map.keySet();
        Object[] ar = s.toArray();
        assertTrue(s.containsAll(Arrays.asList(ar)));
        assertEquals(5, ar.length);
        ar[0] = m10;
        assertFalse(s.containsAll(Arrays.asList(ar)));
    }

    /**
     * Values.toArray contains all values
     */
 
View Full Code Here

/*     */     {
/* 327 */       this.lock.readLock().acquire();
/*     */       try
/*     */       {
/* 330 */         Set state = getCurrentState(false);
/* 331 */         boolean bool = state.containsAll(c);
/*     */         return bool; } finally { this.lock.readLock().release(); }
/*     */     }
/*     */     catch (Exception ex)
/*     */     {
/*     */     }
View Full Code Here

/*     */
/*     */   public boolean equals(Object obj)
/*     */   {
/* 153 */     if ((obj instanceof Set)) {
/* 154 */       Set set = (Set)obj;
/* 155 */       if ((set.containsAll(this)) && (set.size() == size())) {
/* 156 */         return true;
/*     */       }
/*     */     }
/* 159 */     return false;
/*     */   }
View Full Code Here

        for(int i=0; i<otherExtends.length; i++)
        {
            otherExtendsSet.add(otherExtends[i]);
        }
        if(thisExtendsSet.size() != otherExtendsSet.size()) return false;
        if(!(thisExtendsSet.containsAll(otherExtendsSet) && otherExtendsSet.containsAll(thisExtendsSet)))
        {
            return false;
        }
       
        //TODO compare {interface faults}
View Full Code Here

        for(int i=0; i<otherExtends.length; i++)
        {
            otherExtendsSet.add(otherExtends[i]);
        }
        if(thisExtendsSet.size() != otherExtendsSet.size()) return false;
        if(!(thisExtendsSet.containsAll(otherExtendsSet) && otherExtendsSet.containsAll(thisExtendsSet)))
        {
            return false;
        }
       
        //TODO compare {interface faults}
View Full Code Here

    while (localIterator.hasNext())
    {
      Map.Entry localEntry = (Map.Entry)localIterator.next();
      Set localSet = getHandlersForEventType((Class)localEntry.getKey());
      Collection localCollection = (Collection)localEntry.getValue();
      if ((localSet == null) || (!localSet.containsAll((Collection)localEntry.getValue())))
        throw new IllegalArgumentException("missing event handler for an annotated method. Is " + paramObject + " registered?");
      localSet.removeAll(localCollection);
    }
  }
View Full Code Here

                   
            int numberOfRuns = ((Integer) testAction[1]).intValue();
            for (int l = 0; l < numberOfRuns; ++l) { // more then once
                Set ens = configurationFile.getEntryNames();

                if (!ens.containsAll(expectedENs)){
                    throw new TestException(
                            "Returned set contains not expected elements");
                }
                if (!expectedENs.containsAll(ens)){
                    throw new TestException(
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.