Examples of containsValue()


Examples of java.util.Map.containsValue()

        // java.util.TreeMap.tailMap(java.lang.Object)
        Map tail = tm.tailMap(objArray[900].toString());
        assertTrue("Returned map of incorrect size : " + tail.size(), tail
                .size() == (objArray.length - 900) + 9);
        for (int i = 900; i < objArray.length; i++) {
            assertTrue("Map contains incorrect entries", tail
                    .containsValue(objArray[i]));
        }

        // Regression for Harmony-1066
        assertTrue(tail instanceof Serializable);
View Full Code Here

Examples of java.util.Properties.containsValue()

        final String name = "file://foo.txt";
        Properties p = new Properties();
        ManagedConnectionFactoryImpl mcf = new ManagedConnectionFactoryImpl(p);

        mcf.setEJBServicePropertiesURL(name);
        assertTrue(p.containsValue(name));
        assertEquals(name, mcf.getEJBServicePropertiesURL());
    }

    @Test
    public void testSetMonitorEJBServiceProperties() throws Exception {
View Full Code Here

Examples of java.util.SortedMap.containsValue()

        SortedMap head = sm.headMap(toKey);
        assertEquals(1, head.size());
        assertEquals(true, sm.containsKey(first));
        assertEquals(true, head.containsKey(first));
        assertEquals(true, sm.containsValue(firstValue));
        assertEquals(true, head.containsValue(firstValue));
        assertEquals(true, sm.containsKey(second));
        assertEquals(false, head.containsKey(second));
        assertEquals(true, sm.containsValue(secondValue));
        assertEquals(false, head.containsValue(secondValue));
    }
View Full Code Here

Examples of java.util.TreeMap.containsValue()

                "Test Returned Collection From TreeMap.values()", values)
                .runTest();
        values.remove(new Integer(0));
        assertTrue(
                "Removing from the values collection should remove from the original map",
                !myTreeMap.containsValue(new Integer(0)));
    }

    /**
     * @tests java.util.TreeMap#SerializationTest()
     */
 
View Full Code Here

Examples of java.util.WeakHashMap.containsValue()

        refs = callbackCache();
        Pointer cbstruct = ref.cbstruct;
       
        cb = null;
        System.gc();
        for (int i = 0; i < 100 && (ref.get() != null || refs.containsValue(ref)); ++i) {
            try {
                Thread.sleep(10); // Give the GC a chance to run
                System.gc();
            } finally {}
        }
View Full Code Here

Examples of java.util.concurrent.ConcurrentNavigableMap.containsValue()

     * containsValue(null) throws NPE
     */
    public void testContainsValue_NullPointerException() {
        try {
            ConcurrentNavigableMap c = map0();
            c.containsValue(null);
            shouldThrow();
        } catch (NullPointerException success) {}
    }


View Full Code Here

Examples of java.util.jar.Attributes.containsValue()

    public void test_putLjava_lang_ObjectLjava_lang_Object_Null() {

        Attributes attribute = new Attributes();

        assertFalse(attribute.containsKey(null));
        assertFalse(attribute.containsValue(null));
        attribute.put(null, null);
        attribute.put(null, null);
        assertEquals(1, attribute.size());
        assertTrue(attribute.containsKey(null));
        assertTrue(attribute.containsValue(null));
View Full Code Here

Examples of javax.json.JsonObject.containsValue()

            for (final Entry<String, JsonValue> entry : tree.entrySet()) {
                dirs.add(entry.getKey()).set(entry.getValue().toString()).up();
            }
            this.storage.apply(dirs);
            final String ref;
            if (tree.containsValue("name")) {
                ref = tree.getString("name");
            } else {
                ref = sha;
            }
            new MkReferences(this.storage, this.self, this.coords).create(
View Full Code Here

Examples of javax.management.openmbean.CompositeData.containsValue()

        ab.setAdminService(as);
       
        TabularData td = ab.getInstances();
        Assert.assertEquals(2, td.size());
        CompositeData cd1 = td.get(new Object [] {"i1"});
        Assert.assertTrue(cd1.containsValue("i1"));
        Assert.assertTrue(cd1.containsValue(true));
        Assert.assertTrue(cd1.containsValue(1234));
        Assert.assertTrue(cd1.containsValue(8818));
        Assert.assertTrue(cd1.containsValue(1122));
        Assert.assertTrue(cd1.containsValue("somewhere"));
View Full Code Here

Examples of javax.management.openmbean.CompositeDataSupport.containsValue()

         itemNames, itemDescriptions, itemTypes);
      HashMap map = new HashMap();
      map.put("name1", "value1");
      map.put("name2", new Integer(2));
      CompositeDataSupport data = new CompositeDataSupport(compositeType, map);
      assertTrue("data should contain value value1", data.containsValue("value1") == true);
      assertTrue("data should contain value 2", data.containsValue(new Integer(2)) == true);
      assertTrue("data should not contain value name1", data.containsValue("name1") == false);
      assertTrue("data should not contain key null", data.containsValue(null) == false);
      assertTrue("data should not contain key <empty>", data.containsValue("") == false);
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.