/** * Set whether fast on a Map * @param map The map * @param fast Whether it should be fast or not. * @since 1.8.0 */ public static void setCacheFast(final Map<?, ?> map, final boolean fast) { if (map instanceof WeakFastHashMap) { ((WeakFastHashMap<?, ?>)map).setFast(fast); } } }
/** * Set whether fast on a Map * @param map The map * @param fast Whether it should be fast or not. * @since 1.8.0 */ public static void setCacheFast(final Map<?, ?> map, final boolean fast) { if (map instanceof WeakFastHashMap) { ((WeakFastHashMap<?, ?>)map).setFast(fast); } } }
/** Base constructor */ public PropertyUtilsBean() { descriptorsCache = new WeakFastHashMap<Class<?>, BeanIntrospectionData>(); descriptorsCache.setFast(true); mappedDescriptorsCache = new WeakFastHashMap<Class<?>, FastHashMap>(); mappedDescriptorsCache.setFast(true); introspectors = new CopyOnWriteArrayList<BeanIntrospector>(); resetBeanIntrospectors(); }
/** Base constructor */ public PropertyUtilsBean() { descriptorsCache = new WeakFastHashMap<Class<?>, BeanIntrospectionData>(); descriptorsCache.setFast(true); mappedDescriptorsCache = new WeakFastHashMap<Class<?>, FastHashMap>(); mappedDescriptorsCache.setFast(true); introspectors = new CopyOnWriteArrayList<BeanIntrospector>(); resetBeanIntrospectors(); }
/** * Return a shallow copy of this <code>FastHashMap</code> instance. * The keys and values themselves are not copied. * * @return a clone of this map */ @Override public Object clone() { WeakFastHashMap<K, V> results = null; if (fast) { results = new WeakFastHashMap<K, V>(map); } else { synchronized (map) { results = new WeakFastHashMap<K, V>(map); } } results.setFast(getFast()); return (results); }
/** * Return a shallow copy of this <code>FastHashMap</code> instance. * The keys and values themselves are not copied. * * @return a clone of this map */ @Override public Object clone() { WeakFastHashMap<K, V> results = null; if (fast) { results = new WeakFastHashMap<K, V>(map); } else { synchronized (map) { results = new WeakFastHashMap<K, V>(map); } } results.setFast(getFast()); return (results); }
/** * Set whether fast on a Map * @param map The map * @param fast Whether it should be fast or not. * @since 1.8.0 */ public static void setCacheFast(Map map, boolean fast) { if (map instanceof WeakFastHashMap) { ((WeakFastHashMap)map).setFast(fast); } } }
/** * Set whether fast on a Map * @param map The map * @param fast Whether it should be fast or not. * @since 1.8.0 */ public static void setCacheFast(final Map<?, ?> map, final boolean fast) { if (map instanceof WeakFastHashMap) { ((WeakFastHashMap<?, ?>)map).setFast(fast); } } }
/** * Set whether fast on a Map * @param map The map * @param fast Whether it should be fast or not. * @since 1.8.0 */ public static void setCacheFast(Map map, boolean fast) { if (map instanceof WeakFastHashMap) { ((WeakFastHashMap)map).setFast(fast); } } }
/** * Set whether fast on a Map * @param map The map * @param fast Whether it should be fast or not. * @since 1.8.0 */ public static void setCacheFast(Map map, boolean fast) { if (map instanceof WeakFastHashMap) { ((WeakFastHashMap)map).setFast(fast); } } }
/** Base constructor */ public PropertyUtilsBean() { descriptorsCache = new WeakFastHashMap<Class<?>, BeanIntrospectionData>(); descriptorsCache.setFast(true); mappedDescriptorsCache = new WeakFastHashMap<Class<?>, FastHashMap>(); mappedDescriptorsCache.setFast(true); introspectors = new CopyOnWriteArrayList<BeanIntrospector>(); resetBeanIntrospectors(); }