Examples of containsKey()


Examples of org.apache.openejb.util.SuperProperties.containsKey()

                    final String key = entry.getKey().toString();

                    if (key.startsWith(id)) {
                        final String property = key.substring(id.length());

                        if (properties.containsKey(property)) {
                            log.debug("Overriding ejb " + bean.getEjbName() + " property " + property + "=" + entry.getValue());
                        } else {
                            log.debug("Adding ejb " + bean.getEjbName() + " property " + property + "=" + entry.getValue());
                        }
View Full Code Here

Examples of org.apache.openjpa.lib.util.Options.containsKey()

public class PCEnhancerAgent {

    public static void premain(String args, Instrumentation inst) {
        Options opts = Configurations.parseProperties(args);

        if (opts.containsKey("ClassLoadEnhancement") ||
            opts.containsKey("classLoadEnhancement")) {
            if (opts.getBooleanProperty(
                "ClassLoadEnhancement", "classLoadEnhancement", true))
                registerClassLoadEnhancer(inst, opts);
        }
View Full Code Here

Examples of org.apache.pdfbox.cos.COSDictionary.containsKey()

            // override dimensions, see PDFBOX-1735
            parameters.setInt(COSName.WIDTH, image.getWidth());
            parameters.setInt(COSName.HEIGHT, image.getHeight());

            // extract embedded color space
            if (!parameters.containsKey(COSName.COLORSPACE))
            {
                result.setColorSpace(new PDJPXColorSpace(image.getColorModel().getColorSpace()));
            }

            return image;
View Full Code Here

Examples of org.apache.pivot.beans.BeanAdapter.containsKey()

        DefaultProperty defaultProperty = container.getClass().getAnnotation(DefaultProperty.class);
        if (defaultProperty != null) {
            TreeBranch branch = new TreeBranch(nameForObject(container));
            String defaultPropertyName = defaultProperty.value();
            BeanAdapter beanAdapter = new BeanAdapter(container);
            if (!beanAdapter.containsKey(defaultPropertyName)) {
                throw new IllegalStateException("default property " + defaultPropertyName
                    + " not found on " + container);
            }
            Object defaultPropertyValue = beanAdapter.get(defaultPropertyName);
            if (defaultPropertyValue != null) {
View Full Code Here

Examples of org.apache.pivot.web.QueryDictionary.containsKey()

            assertTrue(s, validKeys.remove(s));
        }

        assertEquals(0, validKeys.size());

        assertTrue(dict.containsKey("key2"));

        dict.clear();
    }
}
View Full Code Here

Examples of org.apache.poi.hpsf.CustomProperties.containsKey()

        customProperties.put("min_Long", MIN_LONG);
        customProperties.put("max_Double", MAX_DOUBLE);
        customProperties.put("min_Double", MIN_DOUBLE);
       
        // Check the keys went in
        assertTrue(customProperties.containsKey("Schl\u00fcssel \u00e4"));
        assertTrue(customProperties.containsKey("Boolean"));
       
        // Check the values went in
        assertEquals("Wert \u00e4", customProperties.get("Schl\u00fcssel \u00e4"));
        assertEquals(Boolean.TRUE, customProperties.get("Boolean"));
View Full Code Here

Examples of org.apache.qpid.framing.FieldTable.containsKey()

        boolean connectedToQpid = true;

        FieldTable serverProperties = _conn.getProtocolHandler().getProtocolSession().getConnectionStartServerProperties();
        if(serverProperties != null)
        {
            if(serverProperties.containsKey(ConnectionStartProperties.PRODUCT))
            {
                //String.valueof to ensure it is non-null, then lowercase it
                String product = String.valueOf(serverProperties.getString(ConnectionStartProperties.PRODUCT)).toLowerCase();

                //value is "unknown" when the naming properties file hasn't been found, e.g in IDE.
View Full Code Here

Examples of org.apache.shiro.config.Ini.containsKey()

            perDbPolicy = new Path(resourcePath.getParent(), perDbPolicy);
          }
          try {
            LOGGER.info("Parsing " + perDbPolicy);
            Ini perDbIni = PolicyFiles.loadFromPath(perDbPolicy.getFileSystem(conf), perDbPolicy);
            if(perDbIni.containsKey(USERS)) {
              throw new ConfigurationException("Per-db policy files cannot contain " + USERS + " section");
            }
            if(perDbIni.containsKey(DATABASES)) {
              throw new ConfigurationException("Per-db policy files cannot contain " + DATABASES + " section");
            }
View Full Code Here

Examples of org.apache.sling.api.resource.ModifiableValueMap.containsKey()

            }
            resourceMap.put("lastHeartbeat", currentTime);
            if (firstHeartbeatWritten==-1) {
              resourceMap.put("runtimeId", runtimeId);
            }
            if (resetLeaderElectionId || !resourceMap.containsKey("leaderElectionId")) {
                int maxLongLength = String.valueOf(Long.MAX_VALUE).length();
                String currentTimeMillisStr = String.format("%0"
                        + maxLongLength + "d", System.currentTimeMillis());

                String prefix = "0";
View Full Code Here

Examples of org.apache.sling.api.resource.ValueMap.containsKey()

            String name = ResourceUtil.getName(path);
            String parentPath = ResourceUtil.getParent(path);
            Resource parentResource = getResourceInternal(parentPath);
            if (parentResource!=null) {
                ValueMap props = ResourceUtil.getValueMap(parentResource);
                if (props.containsKey(name)) {
                    return new MockPropertyResource(path, props, this);
                }
            }
        }
       
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.