Examples of containsKey()


Examples of org.castor.cache.Cache.containsKey()

        map.put("fourth key", "forth value");
        map.put("fifth key", "fifth value");
       
        cache.putAll(map);
       
        assertTrue(cache.containsKey("first key"));
        assertTrue(cache.containsKey("second key"));
        assertTrue(cache.containsKey("third key"));
        assertTrue(cache.containsKey("fourth key"));
        assertTrue(cache.containsKey("fifth key"));
    }
View Full Code Here

Examples of org.castor.cache.simple.Unlimited.containsKey()

        assertEquals(10, container.size());
       
        assertEquals(10, cache.size());
        for (int i = 0; i < 10; i++) {
            Object key = new Integer(i);
            assertTrue(cache.containsKey(key));
            assertEquals(cache.get(key), Integer.toString(i) + " refreshed");
        }

        List expired = RefreshingReaperMock.getExpiredObjects();
        assertEquals(10, expired.size());
View Full Code Here

Examples of org.castor.core.util.IdentityMap.containsKey()

    public void testContainsKey() {
        IdentityMap map = new IdentityMap();
        Object key1 = new Integer(123);
        Object key2 = new Integer(123);

        assertFalse(map.containsKey(key1));
        assertFalse(map.containsKey(key2));
       
        map.put(key1, "original value");
        assertTrue(map.containsKey(key1));
        assertFalse(map.containsKey(key2));
View Full Code Here

Examples of org.codehaus.groovy.util.SingleKeyHashMap.containsKey()

    /**
     * @see MetaObjectProtocol#getMetaProperty(String)
     */
    public MetaProperty getMetaProperty(String name) {
        SingleKeyHashMap propertyMap = classPropertyIndex.getNotNull(theCachedClass);
        if (propertyMap.containsKey(name)) {
            return (MetaProperty) propertyMap.get(name);
        } else if (staticPropertyIndex.containsKey(name)) {
            return (MetaProperty) staticPropertyIndex.get(name);
        } else {
            propertyMap = classPropertyIndexForSuper.getNotNull(theCachedClass);
View Full Code Here

Examples of org.cx4a.rsense.typing.runtime.TypeVarMap.containsKey()

                return;
            }
        } else {
            TypeVarMap tvmap = getTypeVarMap(object);
            TypeVariable var = TypeVariable.valueOf("t");
            if (tvmap != null && tvmap.containsKey(var)) {
                element = tvmap.get(var);
            }
        }
       
        int valLen = array != null ? array.length() : 256; // magic number
View Full Code Here

Examples of org.dayatang.cache.Cache.containsKey()

     */
    @Test
    public void testIsKeyInCache() {
        Cache cache = new EhCacheBasedCache("sampleCache");
        cache.put("KEY1", "ABC");
        assertTrue(cache.containsKey("KEY1"));
        cache.remove("KEY1");
        assertTrue(!cache.containsKey("KEY1"));
    }

    @Test
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.testing.CallFixtureMap.containsKey()

        fd = (FactData) fdl.get(0);
        assertEquals("a", fd.getName());

        CallFixtureMap callMap = (CallFixtureMap)fx.get(1);
        assertEquals(2, callMap.size());
        assertTrue(callMap.containsKey("x"));
        FixtureList lcall1 = callMap.get("x");
        CallMethod c1 = (CallMethod)lcall1.get(0);
        assertTrue(c1.getVariable().equals("x"));
        assertTrue(c1.getMethodName().equals("hello"));
        CallMethod c2 = (CallMethod)lcall1.get(1);
View Full Code Here

Examples of org.dynmap.ConfigurationNode.containsKey()

        ForgeWorld.setMaxWorldHeight(cn.getInteger("maxWorldHeight", 256));
       
        // If existing, only switch to save folder if MCPC+
        useSaveFolder = isMCPC;
        // If setting defined, use it
        if (cn.containsKey("useSaveFolderAsName")) {
            useSaveFolder = cn.getBoolean("useSaveFolderAsName", useSaveFolder);
        }
        if (isMCPC) {
            ForgeWorld.setMCPCMapping();
        }
View Full Code Here

Examples of org.eclipse.e4.core.contexts.IEclipseContext.containsKey()

        return img;
      }
    });

    // Check if DS is running
    if (!appContext.containsKey("org.eclipse.e4.ui.workbench.modeling.EModelService")) {
      throw new IllegalStateException("Core services not available. Please make sure that a declarative service implementation (such as the bundle 'org.eclipse.equinox.ds') is available!");
    }

    // Get the factory to create DI instances with
    IContributionFactory factory = (IContributionFactory) appContext.get(IContributionFactory.class.getName());
View Full Code Here

Examples of org.eclipse.emf.ecore.EPackage.Registry.containsKey()

  @Override
  public Injector createInjectorAndDoEMFRegistration() {
    // These must be registered when running in a non-OSGi environment
    Registry registry = EPackage.Registry.INSTANCE;
    if(!registry.containsKey(org.eclipse.xtext.XtextPackage.eNS_URI))
      registry.put(org.eclipse.xtext.XtextPackage.eNS_URI, org.eclipse.xtext.XtextPackage.eINSTANCE);

    if(!registry.containsKey(com.puppetlabs.geppetto.pp.PPPackage.eNS_URI))
      registry.put(com.puppetlabs.geppetto.pp.PPPackage.eNS_URI, com.puppetlabs.geppetto.pp.PPPackage.eINSTANCE);
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.