Package org.apache.commons.collections

Examples of org.apache.commons.collections.FastHashMap$EntrySet


     * @return The FastHashMap instance contains the all {@link LocaleConverter} types for
     *  the specified locale.
     * @deprecated This method will be modified to return a Map in the next release.
     */
    protected FastHashMap lookup(Locale locale) {
        FastHashMap localeConverters;

        if (locale == null) {
            localeConverters = (FastHashMap) mapConverters.get(defaultLocale);
        }
        else {
View Full Code Here


     for the specified locale.
     * @deprecated This method will be modified to return a Map in the next release.
     */
    protected FastHashMap create(Locale locale) {

        FastHashMap converter = new DelegateFastHashMap(BeanUtils.createCache());
        converter.setFast(false);

        converter.put(BigDecimal.class, new BigDecimalLocaleConverter(locale, applyLocalized));
        converter.put(BigInteger.class, new BigIntegerLocaleConverter(locale, applyLocalized));

        converter.put(Byte.class, new ByteLocaleConverter(locale, applyLocalized));
        converter.put(Byte.TYPE, new ByteLocaleConverter(locale, applyLocalized));

        converter.put(Double.class, new DoubleLocaleConverter(locale, applyLocalized));
        converter.put(Double.TYPE, new DoubleLocaleConverter(locale, applyLocalized));

        converter.put(Float.class, new FloatLocaleConverter(locale, applyLocalized));
        converter.put(Float.TYPE, new FloatLocaleConverter(locale, applyLocalized));

        converter.put(Integer.class, new IntegerLocaleConverter(locale, applyLocalized));
        converter.put(Integer.TYPE, new IntegerLocaleConverter(locale, applyLocalized));

        converter.put(Long.class, new LongLocaleConverter(locale, applyLocalized));
        converter.put(Long.TYPE, new LongLocaleConverter(locale, applyLocalized));

        converter.put(Short.class, new ShortLocaleConverter(locale, applyLocalized));
        converter.put(Short.TYPE, new ShortLocaleConverter(locale, applyLocalized));

        converter.put(String.class, new StringLocaleConverter(locale, applyLocalized));

        // conversion format patterns of java.sql.* types should correspond to default
        // behaviour of toString and valueOf methods of these classes
        converter.put(java.sql.Date.class, new SqlDateLocaleConverter(locale, "yyyy-MM-dd"));
        converter.put(java.sql.Time.class, new SqlTimeLocaleConverter(locale, "HH:mm:ss"));
        converter.put( java.sql.Timestamp.class,
                       new SqlTimestampLocaleConverter(locale, "yyyy-MM-dd HH:mm:ss.S")
                     );

        converter.setFast(true);

        return converter;
    }
View Full Code Here

   
    // ---------------------------------------------------------- Constructors
   
    /** Base constructor */
    public PropertyUtilsBean() {
        descriptorsCache = new FastHashMap();
        descriptorsCache.setFast(true);
        mappedDescriptorsCache = new FastHashMap();
        mappedDescriptorsCache.setFast(true);
    }
View Full Code Here

                    return (descriptors[i]);
            }
        }

        PropertyDescriptor result = null;
        FastHashMap mappedDescriptors =
                getMappedPropertyDescriptors(bean);
        if (mappedDescriptors == null) {
            mappedDescriptors = new FastHashMap();
            mappedDescriptors.setFast(true);
            mappedDescriptorsCache.put(bean.getClass(), mappedDescriptors);
        }
        result = (PropertyDescriptor) mappedDescriptors.get(name);
        if (result == null) {
            // not found, try to create it
            try {
                result =
                        new MappedPropertyDescriptor(name, bean.getClass());
            } catch (IntrospectionException ie) {
            }
            if (result != null) {
                mappedDescriptors.put(name, result);
            }
        }
       
        return result;
View Full Code Here

    protected final FastHashMap cacheById;
    protected final FastHashMap cacheByClass;

    public MetaBeanCache() {
        this.cacheById = new FastHashMap();
        cacheByClass = new FastHashMap();
        cacheByClass.setFast(true);
        cacheById.setFast(true);
    }
View Full Code Here

        if (beanLookup == null) initBeanLookup();
        return beanLookup.get(id);
    }

    private void initBeanLookup() {
        beanLookup = new FastHashMap();
        for (XMLMetaBean bean : beans) {
            beanLookup.put(bean.getId(), bean);
        }
        ((FastHashMap) beanLookup).setFast(true);
    }
View Full Code Here

        }
        ((FastHashMap) beanLookup).setFast(true);
    }

    private void initValidationLookup() throws Exception {
        validationLookup = new FastHashMap();
        for (XMLMetaValidator xv : validators) {
            if (xv.getJava() != null) {
                Validation validation =
                        (Validation) ClassUtils.getClass(xv.getJava()).newInstance();
                xv.setValidation(validation);
View Full Code Here

                    SpringContextSingleton ctxHolder = SpringContextSingleton
                            .getInstance();
                    if (ctxHolder.isInitialized()) {
                        Map<String, String> icons = (Map<String, String>) ctxHolder
                                .getContext().getBean("fileExtensionIcons");
                        FastHashMap mappings = new FastHashMap(icons);
                        mappings.setFast(true);
                        String[] jsMappings = new String[2];
                        jsMappings[0] = new StringBuilder(512).append("\"")
                                .append(
                                        StringUtils.join(mappings.keySet()
                                                .iterator(), "\", \"")).append(
                                        "\"").toString();
                        jsMappings[1] = new StringBuilder(512).append("\"")
                                .append(
                                        StringUtils.join(mappings.values()
                                                .iterator(), "\", \"")).append(
                                        "\"").toString();
                        fileExtensionIconsMapping = jsMappings;
                        fileExtensionIcons = mappings;
                    }
View Full Code Here

// --------------------------- CONSTRUCTORS ---------------------------

    @SuppressWarnings("unchecked")
    protected JahiaUserManagerRoutingService () {
      FastHashMap map = new FastHashMap(2);
      map.setFast(true);
        providersTable = map;

        sortedProviders = new TreeSet<JahiaUserManagerProvider>(new Comparator<JahiaUserManagerProvider>() {
            public int compare (JahiaUserManagerProvider o1, JahiaUserManagerProvider o2) {
                return o1.getPriority () - o2.getPriority ();
View Full Code Here

    Connection con =null;
    try {
        DatabaseMetaData metaData = null;
        con =  DbConnectionManager.getConnection();
        metaData = con.getMetaData();
        HashMap props = new FastHashMap();
        props.put("name",metaData.getDatabaseProductName());
        props.put("version",metaData.getDatabaseProductVersion() );
        props.put("driver",metaData.getDriverName()+" "+  metaData.getDriverVersion());
        props.put("url",metaData.getURL());
        props.put("user",metaData.getUserName());
        props.put("transaction",(metaData.supportsTransactions())?"Yes":"No");
        props.put("multiple",(metaData.supportsMultipleTransactions())?"Yes":"No");
        props.put("readOnly",(metaData.isReadOnly())?"Yes":"No" );
         
        request.setAttribute("props",props);
       
       
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.FastHashMap$EntrySet

Copyright © 2018 www.massapicom. 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.