Class VABLambdaProviderHelper


  • public class VABLambdaProviderHelper
    extends Object
    Helper class which allows to easily create properties as processed by the VABLambdaProvider
    Author:
    schnicke, espen
    • Constructor Detail

      • VABLambdaProviderHelper

        public VABLambdaProviderHelper()
    • Method Detail

      • createSimple

        public static Map<String,​Object> createSimple​(Supplier<Object> get,
                                                            Consumer<Object> set)
        Creates a property referencing a simple value, e.g. int, double, ..
        Parameters:
        get - Method used to get the value
        set - Method used to set the value
        Returns:
      • createMap

        public static Map<String,​Object> createMap​(Supplier<?> get,
                                                         Consumer<?> set,
                                                         BiConsumer<String,​Object> insert,
                                                         Consumer<Object> removeObject,
                                                         Consumer<String> removeKey)
        Creates a property referencing a map
        Parameters:
        get - Method used to get the map
        set - Method used to set the map
        insert - Method used to insert an element into the map
        removeObject - Method used to remove an object from the map
        removeKey - Method used to remove a key from the map
        Returns:
      • createCollection

        public static Map<String,​Object> createCollection​(Supplier<?> get,
                                                                Consumer<?> set,
                                                                Consumer<Object> insert,
                                                                Consumer<Object> removeObject,
                                                                Consumer<String> removeKey)
        Creates a property referencing a collection
        Parameters:
        get - Method used to get the collection
        set - Method used to set the collection
        insert - Method used to insert an element into the map
        removeObject - Method used to remove an object from the map
        removeKey - Method used to remove a key from the map
        Returns: