类 MutablePropertyValues

    • 构造器详细资料

      • MutablePropertyValues

        public MutablePropertyValues​(Map<?,​?> original)
        Construct a new MutablePropertyValues object from a Map.
        参数:
        original - Map with property values keyed by property name Strings
        另请参阅:
        addPropertyValues(Map)
      • MutablePropertyValues

        public MutablePropertyValues​(List<PropertyValue> propertyValueList)
        Construct a new MutablePropertyValues object using the given List of PropertyValue objects as-is.

        This is a constructor for advanced usage scenarios. It is not intended for typical programmatic use.

        参数:
        propertyValueList - List of PropertyValue objects
    • 方法详细资料

      • getPropertyValueList

        public List<PropertyValuegetPropertyValueList()
        Return the underlying List of PropertyValue objects in its raw form. The returned List can be modified directly, although this is not recommended.

        This is an accessor for optimized access to all PropertyValue objects. It is not intended for typical programmatic use.

      • size

        public int size()
        Return the number of PropertyValue entries in the list.
      • addPropertyValues

        public MutablePropertyValues addPropertyValues​(PropertyValues other)
        Copy all given PropertyValues into this object. Guarantees PropertyValue references are independent, although it can't deep copy objects currently referenced by individual PropertyValue objects.
        参数:
        other - the PropertyValues to copy
        返回:
        this in order to allow for adding multiple property values in a chain
      • addPropertyValues

        public MutablePropertyValues addPropertyValues​(Map<?,​?> other)
        Add all property values from the given Map.
        参数:
        other - Map with property values keyed by property name, which must be a String
        返回:
        this in order to allow for adding multiple property values in a chain
      • addPropertyValue

        public MutablePropertyValues addPropertyValue​(PropertyValue pv)
        Add a PropertyValue object, replacing any existing one for the corresponding property or getting merged with it (if applicable).
        参数:
        pv - PropertyValue object to add
        返回:
        this in order to allow for adding multiple property values in a chain
      • add

        public MutablePropertyValues add​(String propertyName,
                                         Object propertyValue)
        Add a PropertyValue object, replacing any existing one for the corresponding property or getting merged with it (if applicable).
        参数:
        propertyName - name of the property
        propertyValue - value of the property
        返回:
        this in order to allow for adding multiple property values in a chain
      • contains

        public boolean contains​(String propertyName)
        从接口复制的说明: PropertyValues
        Is there a property value (or other processing entry) for this property?
        指定者:
        contains 在接口中 PropertyValues
        参数:
        propertyName - the name of the property we're interested in
        返回:
        whether there is a property value for this property
      • registerProcessedProperty

        public void registerProcessedProperty​(String propertyName)
        Register the specified property as "processed" in the sense of some processor calling the corresponding setter method outside of the PropertyValue(s) mechanism.

        This will lead to true being returned from a contains(java.lang.String) call for the specified property.

        参数:
        propertyName - the name of the property.
      • clearProcessedProperty

        public void clearProcessedProperty​(String propertyName)
        Clear the "processed" registration of the given property, if any.
        从以下版本开始:
        3.2.13
      • setConverted

        public void setConverted()
        Mark this holder as containing converted values only (i.e. no runtime resolution needed anymore).
      • isConverted

        public boolean isConverted()
        Return whether this holder contains converted values only (true), or whether the values still need to be converted (false).