/** * <p>Returns the Set of the property * names in the decorated {@link DynaBean}.</p> * * <p><b>N.B.</b>For {@link DynaBean}s whose associated {@link DynaClass} * is a {@link MutableDynaClass} a new Set is created every * time, otherwise the Set is created only once and cached.</p> * * @return An unmodifiable set of the {@link DynaBean}s * property names. */ public Set<K> keySet() { if (keySet != null) { return keySet; } // Create a Set of the keys final DynaProperty[] properties = getDynaProperties(); Set<K> set = new HashSet<K>(properties.length); for (DynaProperty propertie : properties) { set.add(convertKey(propertie.getName())); } set = Collections.unmodifiableSet(set); // Cache the keySet if Not a MutableDynaClass final DynaClass dynaClass = getDynaBean().getDynaClass(); if (!(dynaClass instanceof MutableDynaClass)) { keySet = set; } return set; }
/** * <p>Returns the Set of the property * names in the decorated {@link DynaBean}.</p> * * <p><b>N.B.</b>For {@link DynaBean}s whose associated {@link DynaClass} * is a {@link MutableDynaClass} a new Set is created every * time, otherwise the Set is created only once and cached.</p> * * @return An unmodifiable set of the {@link DynaBean}s * property names. */ public Set<K> keySet() { if (keySet != null) { return keySet; } // Create a Set of the keys final DynaProperty[] properties = getDynaProperties(); Set<K> set = new HashSet<K>(properties.length); for (DynaProperty propertie : properties) { set.add(convertKey(propertie.getName())); } set = Collections.unmodifiableSet(set); // Cache the keySet if Not a MutableDynaClass final DynaClass dynaClass = getDynaBean().getDynaClass(); if (!(dynaClass instanceof MutableDynaClass)) { keySet = set; } return set; }
/** * <p>Returns the Set of the property/value mappings * in the decorated {@link DynaBean}.</p> * * <p>Each element in the Set is a <code>Map.Entry</code> * type.</p> * * @return An unmodifiable set of the DynaBean * property name/value pairs */ public Set<Map.Entry<K, Object>> entrySet() { final DynaProperty[] properties = getDynaProperties(); final Set<Map.Entry<K, Object>> set = new HashSet<Map.Entry<K, Object>>(properties.length); for (DynaProperty propertie : properties) { final K key = convertKey(propertie.getName()); final Object value = getDynaBean().get(propertie.getName()); set.add(new MapEntry<K>(key, value)); } return Collections.unmodifiableSet(set); }
/** * <p>Returns the Set of the property/value mappings * in the decorated {@link DynaBean}.</p> * * <p>Each element in the Set is a <code>Map.Entry</code> * type.</p> * * @return An unmodifiable set of the DynaBean * property name/value pairs */ public Set<Map.Entry<K, Object>> entrySet() { final DynaProperty[] properties = getDynaProperties(); final Set<Map.Entry<K, Object>> set = new HashSet<Map.Entry<K, Object>>(properties.length); for (DynaProperty propertie : properties) { final K key = convertKey(propertie.getName()); final Object value = getDynaBean().get(propertie.getName()); set.add(new MapEntry<K>(key, value)); } return Collections.unmodifiableSet(set); }
/** * <p>Returns the Set of the property * names in the decorated {@link DynaBean}.</p> * * <p><b>N.B.</b>For {@link DynaBean}s whose associated {@link DynaClass} * is a {@link MutableDynaClass} a new Set is created every * time, otherwise the Set is created only once and cached.</p> * * @return An unmodifiable set of the {@link DynaBean}s * property names. */ public Set<K> keySet() { if (keySet != null) { return keySet; } // Create a Set of the keys final DynaProperty[] properties = getDynaProperties(); Set<K> set = new HashSet<K>(properties.length); for (DynaProperty propertie : properties) { set.add(convertKey(propertie.getName())); } set = Collections.unmodifiableSet(set); // Cache the keySet if Not a MutableDynaClass final DynaClass dynaClass = getDynaBean().getDynaClass(); if (!(dynaClass instanceof MutableDynaClass)) { keySet = set; } return set; }
/** * <p>Returns the Set of the property/value mappings * in the decorated {@link DynaBean}.</p> * * <p>Each element in the Set is a <code>Map.Entry</code> * type.</p> * * @return An unmodifiable set of the DynaBean * property name/value pairs */ public Set<Map.Entry<K, Object>> entrySet() { final DynaProperty[] properties = getDynaProperties(); final Set<Map.Entry<K, Object>> set = new HashSet<Map.Entry<K, Object>>(properties.length); for (DynaProperty propertie : properties) { final K key = convertKey(propertie.getName()); final Object value = getDynaBean().get(propertie.getName()); set.add(new MapEntry<K>(key, value)); } return Collections.unmodifiableSet(set); }