com.vaadin.flow.internal.nodefeature.

Class AbstractPropertyMap

    • Constructor Detail

      • AbstractPropertyMap

        public AbstractPropertyMap(StateNode node)

        Creates a new element property map for the given node.

        Parameters:

        node - the node that the map belongs to

    • Method Detail

      • setProperty

        public void setProperty(String name,
                                Serializable value,
                                boolean emitChange)

        Sets a property to the given value.

        Parameters:

        name - the property name

        value - the value, must be a string, a boolean, a double or null

        emitChange - true to create a change event for the client side

      • hasProperty

        public boolean hasProperty(String name)

        Checks whether there is a property of the given name.

        Parameters:

        name - the name of the property

        Returns:

        true if there is a property with the given name; false if there is no property

      • removeProperty

        public void removeProperty(String name)

        Removes the given property.

        Parameters:

        name - the name of the property to remove

      • removeAllProperties

        public void removeAllProperties()

        Removes all properties.

      • getProperty

        public Serializable getProperty(String name)

        Gets the value of the given property.

        Parameters:

        name - the name of the property

        Returns:

        the property value; null if there is no property or if the value is explicitly set to null

      • getPropertyNames

        public Stream<String> getPropertyNames()

        Gets the property names.

        Returns:

        a stream containing all the property names that have been set

      • isValidValueType

        public static boolean isValidValueType(Serializable value)

        Checks if the given value is of a supported type.

        Parameters:

        value - the value to check, may be null

        Returns:

        true if the type is supported, false otherwise