Interface CollectionValueSetter

  • All Superinterfaces:
    ValueSetter

    public interface CollectionValueSetter
    extends ValueSetter
    Base interface for all objects that contains logic how specific value can be set to the specified object. This setter supports simple values and collections as values. In case collection is passed as value and setter is not atomic, setValue perform "add" function and you need to call removeValue if you need a "remove" function. In case value is not a collection, removeValue operation is undefined
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean canRemoveValue​(javax.jmi.reflect.RefObject object, java.lang.Object value)
      Checks if value can be removed from this object
      boolean canSetValue​(javax.jmi.reflect.RefObject object, java.lang.Object value)
      checks value compliance with the result specification and write permissions.
      boolean isAtomic()  
      default void removeValue​(javax.jmi.reflect.RefObject object, java.lang.Object value)
      Implementation should remove property value of the specified object.
      void removeValue​(javax.jmi.reflect.RefObject object, java.lang.Object value, java.lang.Object context)  
    • Method Detail

      • removeValue

        default void removeValue​(javax.jmi.reflect.RefObject object,
                                 java.lang.Object value)
        Implementation should remove property value of the specified object. This method makes sense only if property value is collection
        Parameters:
        object - an element.
        value - a value to remove.
      • removeValue

        void removeValue​(javax.jmi.reflect.RefObject object,
                         java.lang.Object value,
                         @CheckForNull
                         java.lang.Object context)
      • canSetValue

        boolean canSetValue​(javax.jmi.reflect.RefObject object,
                            @CheckForNull
                            java.lang.Object value)
        checks value compliance with the result specification and write permissions. Returns true, if this value can be set
        Parameters:
        object - object
        value - value to set
        Returns:
        true if allowed
      • canRemoveValue

        boolean canRemoveValue​(javax.jmi.reflect.RefObject object,
                               @CheckForNull
                               java.lang.Object value)
        Checks if value can be removed from this object
        Parameters:
        object - object
        value - value to remove
        Returns:
        true if value can be removed
      • isAtomic

        boolean isAtomic()
        Returns:
        true if setter supports setting on a whole collection of values